"Succession in the Presidency of the Church has been established by the Lord. The Church is never without inspired leadership, and there is no reason for speculation or controversy over who will become the next President of the Church." Teachings of the Living Prophets Student Manual (2010), Chapter 3: Succession in the Presidency (p. 28)
However, when Joseph Smith died June 27, 1844, the Church was without a "president" and there was much speculation and controversy until December 27, 1847 when Brigham Young became the president at Kanesville (Council Bluffs), Iowa. The Church was without a president for 2 and a half years. Brigham Young: Second President of the Church, Presidents of the Church Student Manual, (2012), Age 46 in chart
As with many things in LDS history, succession after Joseph Smith was very complex. Was God providing the early Saints an opportunity to learn and grow, or was no one in charge and things just naturally happened?
A fairly succinct outline of the revelations and documents about who was called to different leadership positions in the early Church and how it leads to the current concept of succession. Succession of Church President by H. Michael Marquardt.
Also see Wikipedia's Lineal Succession article concerning the idea that certain positions within the Church were handed down based on lineage and Succession Crisis.