Let's explore the process by looking at one notable example of a doctrine that has changed over time.
Doctrine & Covenants section 89, commonly referred to as "the Word of Wisdom" among Latter-Day Saints, was a revelation received by the prophet Joseph Smith in 1833 concerning the health of church members. It was explicitly given
2 To be sent greeting; not by commandment or constraint, but by revelation and the word of wisdom
The reason that it was "not by commandment or constraint" becomes apparent when you understand the content of the revelation: Among other things, Section 89 is the source of the well-known Mormon prohibition on the consumption of alcohol and tobacco. Requiring the established members of the church, many of whom used such things heavily at the time, to quit cold-turkey would likely have led to chaos, for medical reasons that are much better-understood today than in the 1830s.
However, by 1851, nearly 2 decades had passed. During the General Conference of the church held in September, Brigham Young (Smith's successor as President of the Church) proposed to all Church members that the Word of Wisdom should be recognized by that point as a binding commandment and that the failure to follow its principles should be regarded as a sin and an act of disobedience.
President Young amongst other things said he knew the goodness of the people, and the Lord bears with our weakness; we must serve the Lord, and those who go with me will keep the Word of Wisdom, and if the High Priests, the Seventies, the Elders, and others will not serve the Lord, we will sever them from the Church. I will draw the line, and know who is for the Lord and who is not, and those who will not keep the Word of Wisdom, I will cut off from the Church; I throw out a challenge to all men and women.
-- Minutes of the General Conference
His proposal was put before the body of the Church for a sustaining vote, per the principle of Common Consent, and was accepted unanimously.
Today, a person who does not follow the Word of Wisdom, who partakes of addictive drugs such as alcohol and tobacco, is not able to be baptized and join the Church, and one who is already a member who breaks these principles is considered to be in need of repentance, and is not worthy to enter the Temple, a standard that everyone is taught that they should meet.