Mormonism teaches that we existed prior to being born or conceived. According to Mormon doctrine, we all existed first as spirit children of the God, our Heavenly Father, and his wife or wives. They created us out of eternal intelligences that existed already in the universe, just as they themselves were created by their own gods.
This is perhaps one of the most unique beliefs of the Mormon church.
Ensoulment and Spirits
Traditional, orthodox Christianity has taught a variety of things about ensoulment — the time when a soul enters the human body. The early Catholic Church taught that ensoulment occurred at some point during the pregnancy, for example at quickening. Modern conservative evangelical Christianity teaches that "life" and thus also ensoulment occurs at the moment of conception.
The teachings of the Church of Jesus Christ of Latter-day Saints (LDS Church) represent a radical departure from all of this. According to Mormonism, we existed first as eternal intelligences as part of the universe — just as eternal as God, who also existed first as one of those intelligences. These intelligences have consciousness, self-awareness, and individuality.
Then God's wife or wives gave birth to us as "spirit children," an unknown process through which those intelligences are given spirit bodies. God and his wife or wives are all physical beings who are married, so presumably physical sex is involved — but how physical sex causes an immaterial intelligence to become an immaterial spirit child is unclear.
For an undetermined amount of time, but possibly billions of years, we lived as spirit children in happiness with God at Kolob. Some of us acted as "angels" in human affairs. At some point we made the choice to become born in physical bodies, though losing all of our memories of living with God. We are given this option because no matter how happy were were, we could not experience "fulness of joy" that God experiences because God has already been born and lived as a physical being.
Thus God created a "Plan of Salvation," according to which his spirit children would have the opportunity to choose good or evil as physical beings. Of course, they would necessarily fall short of expectations and in the end those choices wouldn't decide whether they'd actually be saved or not — only the choice to believe in Mormon teachings would do that, and specifically accepting their brother Jesus as their Savior. It's not clear why we can't just do that on Kolob.
Mormon Texts and Leaders on Spirit Children
Brigham Young gave a talk in Salt Lake City which is recorded in the Journal of Discourses:
"I want to tell you, each and every one of you, that you are well acquainted with God our heavenly Father, or the great Eloheim. You are all well acquainted with Him, for there is not a soul of you but what has lived in His house and dwelt with Him year after year...you have merely forgotten what you did know. ...
There is not a person here to-day but what is a son or a daughter of that Being. In the spirit world their spirits were first begotten and brought forth, and they lived there with their parents for ages before they came here.
This, perhaps, is hard for many to believe, but it is the greatest nonsense in the world not to believe it. If you do not believe it, cease to call Him Father; and when you pray, pray to some other character. It would be inconsistent in you to disbelieve what I think you know, and then to go home and ask the Father to do so and so for you.
The Scriptures which we believe have taught us from the beginning to call Him our Father, and we have been taught to pray to Him as our Father, in the name of our eldest brother whom we call Jesus Christ, the Saviour of the world; and that Saviour, while here on earth, was so explicit on this point, that he taught his disciples to call no man on earth father, for we have one which is in heaven.
He is the Saviour, because it is his right to redeem the remainder of the family pertaining to the flesh on this earth, if any of you do not believe this, tell us how and what we should believe. If I am not telling you the truth, please to tell me the truth on this subject, and let me know more than I do know.
If it is hard for you to believe, if you wish to be Latter-day Saints, admit the fact as I state it, and do not contend against it. Try to believe it, because you will never become acquainted with our Father, never enjoy the blessings of His Spirit, never be prepared to enter into His presence, until you most assuredly believe it; therefore you had better try to believe this great mystery about God."
The simplest and most straightforward statement of this Mormon teaching probably comes from the Discourses of Brigham Young:
"There never was a time when man did not exist, and there never will be a time when he will cease to exist"
The same text also says:
"We are the sons and daughters of celestial Beings, and the germ of the Deity dwells within us. When our spirits took possession of these tabernacles, they were as pure as the angels of God, wherefore total depravity cannot be a true doctrine. [...]
Intelligent beings are organized to become Gods, even the Sons of God, to dwell in the presence of the Gods, and become associated with the highest intelligences that dwell in eternity. We are now in the school, and must practice upon what we receive"
Spirit Children and Mormon Families
This teaching about our prior life with God is why Mormons address each other as "Brother" and "Sister" — they mean it literally, not metaphorically like in some organizations. Even Jesus Christ is literally the brother of all human beings. In Mormon teaching Jesus is not "God," but rather one of many other of God's spirit children.
This is also one reason why Mormons feel obligated to have large families with lots of children. Mormons are taught by the LDS Church that there are billions of spirit children living with God who are waiting to be born into physical forms. They are taught that the best chance of progressing to the highest heaven, and even becoming gods eventually, is to be raised in Mormonism which is the only true religion. So the more Mormon children there are, the more of God's spirit children that will have the best chance possible of going to the highest heaven and becoming gods.
In fact, Mormons really want to avoid having these spirit children born into "wicked" families. Brigham Young is recorded as saying in Discourses of Brigham Young:
"There are multitudes of pure and holy spirits waiting to take tabernacles, now what is our duty?—To prepare tabernacles for them; to take a course that will not tend to drive those spirits into the families of the wicked, where they will be trained in wickedness, debauchery, and every species of crime. It is the duty of every righteous man and woman to prepare tabernacles for all the spirits they can."
What's more, this teaching is one reason why polygamy was defended so strongly by the early Mormons. More wives meant more children and more children born to Mormon homes meant more of God's spirit children who could be raised in the proper environment that would allow them the best chances of not only obtaining God's salvation, but becoming gods themselves.
Although this is one of the most fundamental teachings of Mormonism, it isn't something that Mormons typically discuss with non-Mormons. When Mormons speak out against abortion, for example, you won't hear references to spirit children or existing prior to conception. You certainly won't hear prominent Mormon politicians like Mitt Romney reference this teaching when they give speeches on issues like abortion.
Obedient & Disobedient Spirit Children
Although it may sound like being born into physical bodies is necessary for free will and making moral choices, Mormonism has also taught that God's spirit children could be obedient or disobedient. The most obedient spirit children are born into families that give them extra advantages while those who are disobedient are born into families that come with disadvantages.
Joseph Fielding Smith, Mormon Prophet from 1970 to 1972, wrote in Doctrines of Salvation:
"There is a reason why one man is born black and with other disadvantages, while another is born white with great advantages. The reason is that we once had an estate before we came here, and were obedient, more or less, to the laws that were given us there. Those who are faithful in all things there received greater blessings here, and those who were not faithful received less."
Just before this passage, Smith said that "the Lord looks upon all his children in mercy and will do for them just the best that he can."