Mormon theology is pretty ambiguous about the Holy Spirit and what he is exactly. He is considered the third god in the Mormon Godhead, but unlike the Father and Son, who posses bodies of flesh and bone, the Holy Spirit only possesses a spiritual body made up of another kind of material, this same concept is applied to the pre-existent spirit children of the Father and Heavenly Mother in Mormonism. Some Mormons are of the opinion that the Holy Spirit may be a spirit child of the Father, and that he too might get a fleshly body one day, but there isn’t a consensus on that.
Early Joseph Smith saw the Holy Spirit as the uniting principle, purpose, or “mind” of the Father and Son rather than a distinct third personage of his own as evidence in his “Lectures on Faith” (1835). It wasn’t until later that Smith decided that the Holy Spirit was a third distinct personage from the Father and Son, and this is where the modern day Mormon Godhead comes from.