Prior to mortal birth individuals existed as men and women in a spirit state and thus coexisted with both the Father and the Son. That period of life is also referred to as the first estate or pre-existence.
The Bible presents the concept that mankind had a preparation period prior to mortal birth. The Lord said to Jeremiah: "Before I formed thee in the belly I knew thee; and before thou camest forth out of the womb I sanctified thee, and I ordained thee a prophet unto the nations" (Jer. 1:5), and the "Preacher" asserted "The spirit shall return unto God who gave it" (Eccl. 12:7). In other scriptures, such as Alma 13:3, it is written that priests were "called and prepared from the foundation of the world according to the foreknowledge of God, on account of their exceeding faith and good works."
There is indeed indication that the intelligence dwelling in each person is coeternal with God. It always existed and never was created or made (D&C 93:29). In due time that intelligence was given a spirit body, becoming the spirit child of God the Eternal Father and his beloved companion, the Mother in Heaven. This spirit, inhabited by the eternal intelligence, took the form of its creators and is in their image (Ballard, p. 140).
To the Prophet Joseph Smith it was revealed that we are all literal spirit sons and daughters of heavenly parents. He received a revelation of information once made known to Moses: "I [God] made the world, and men before they were in the flesh" (Moses 6:51). This likewise reflects the implication in Numbers 16:22that God is the Father of all, and hence he is "the God of the spirits of all flesh."
Intelligences were organized before the world was, and among these were many great and noble ones, such as Abraham and Moses. God stood in their midst, saw that they were good, and chose them for responsibilities on earth and throughout eternity (Abr. 3:21-23). Jesus, the firstborn spirit, was preeminent among them. "Jesus…existed with the Father prior to birth in the flesh; and…in the pre-existent state He was chosen and ordained to be the one and only Savior and Redeemer of the human race" (JC, p. 6).
Revelation indicates that all things, even the earth itself, had a spirit existence before the physical creation. Elder Joseph Fielding Smith wrote, "Not only has man a spirit, and is thereby a living soul, but likewise the beasts of the field, the fowl of the air, and the fish of the sea have spirits, and hence are living souls…. The fish, the fowl, the beasts of the field lived before they were placed naturally in this earth, and so did the plants that are upon the face of the earth. The spirits that possess the bodies of the animals are in the similitude of their bodies" (DS 1:63-64). The biblical passage that says the Lord God made "every plant of the field before it was in this earth, and every herb of the field before it grew" (Gen. 2:5) is clarified in a parallel scripture with the words: "For I, the Lord God, created all things, of which I have spoken, spiritually before they were naturally upon the face of the earth…and I, the Lord God, had created all the children of men and not yet a man to till the ground; for in heaven created I them" (Moses 3:5).