I know that they were 'facing persecution' but what exactly did this entail and who was it from? Also, was there any specific reason that they decided to travel to (what became) Utah or did they just set out in a random direction and were 'guided' by their prophet and God?
First off, I want to apologize for poor editing/grammar/tone as I know it will be inevitable but…
Your question is a little complicated per the fact that one can have multiple reasons for moving, there were multiple moves from places moved to and multiple moves to each place and also those who didn't move. Leadership =/= masses so I am going to presume you are talking about masses, mostly because I am more familiar with that then particular individuals. (Side note Oliver Granger was commanded to stay in Kirtland to resolve church debts when the church left.)
There were 5 major moves:
1830/1 (Palmyra, Fayette, Harmony):
The church was founded in 1830 in Fayette NY, where Joseph's family resided. After he married Emma Hale, he lived with his father in Harmony Pennsylvania and that is where the church was centered. After publishing the book of Mormon, Emma's father kicked them out of their farmhouse and soon Joseph claimed a vision that the Church would move to Kirtland Ohio. People around the "burnt over district" were largely unimpressed by Mormonism and new potential converts, especially those of Sidney Rigdon's 100 member congregation, encouraged movement eastward. Additionally, Joseph Smith found himself in a good bit of trouble with the law as he was sued multiple times for disturbing the peace, fraud, and treasure-digging. Busman here says that Joseph was forced out of Harmony and that he brought the church with him.
Kirtland:
In 1831 The church set up shop in Kirtland Ohio. By this time period the church had grown to several hundreds and some still lingered in Colesville, Palmyra, Fayette, Harmony, and other pockets along the way. Missionaries were being sent to Canada, the UK, and out west. In 1831 Joseph Smith had lost multiple children while they were still infants. In 1832 the Mormons began building a temple and the church grew rather large. In 1837 The Kirtland Safety society bankrupted many Mormons and caused a schism that would lead to Martin Harris and Warren Parrish and others to "commandeer" the temple. Conflicts over leadership especially in conjunction with failed prophecies, prophecies from others besides Joseph, and authority outside of Kirtland led to a lot of in-fighting and schisms with some leaving as early as 1831. Joseph and many other Mormons were subjected to mob violence including Joseph being tarred and feathered and nearly castrated by Mormons and non-mormons. Some of this was due to dissenters whipping up discontent, such as Doctor(First name) Philastus Hurlbut, but also due to controversy over theocracy and Mormon violence, Danites, poverty, polygamy, and accusations of assassination. In particular, the 1835 affair with Fanny Ager, over which Oliver Cowdrey was excommunicated, and the private practice of polygamy caused a good bit of a stir with higher ranking Mormons and non-mormons. The 1837 events though deprived Mormons of their homes and made it no longer safe to live in Kirtland and so the moved west.
Independence:
1838 Mormon War and the Missouri Executive Order 44 "Extermination Order" In 1831 Joseph Smith prophesied that Independence, Missouri, would be "the center place; and a spot for the temple is lying westward, upon a lot which is not far from the courthouse" (DC 57:3)." He also prophecied a temple would be built there. It is near what the mormons call "adam ondi ahman" which is supposedly where Adam left the garden of Eden and where "Zion" was to be built near. As such in 1831 Mormons started moving to Independece Missouri with the intention of making a utopia to await the second coming of Christ. Incidents in Kirtland brought a large influx of individuals into a newer, less populated state which all immediately began to vote in favor of making Zion in Missouri. Joseph then spent a lot of time out of the state leaving the group in less capable hands. Danites, abolitionism, Zionism, social separation, polygamy, and accusations of theocracy led to battles at the ballot box being literal. By 1834 many Mormons had been pushed from their homes by violence which led to Zion's camp, a failed attempt to use a Mormon Militia to re-capture Zion. The Mormons fought with mobs later and by 1834 clashed with the state militia at the Battle of Crooked River, culminating with governor Boggs giving an executive order stating "The Mormons must be treated as enemies, and must be exterminated or driven from the state if necessary for the public peace." Most of the Mormons had all packed up by the end of the following year. Joseph Smith was arrested in 1838 and thrown in Liberty Jail but was released.
Nauvoo:
In Nauvoo another temple was built. The Mormons had made Joseph mayor, chief judge, head of the militia, and accusations of theocracy followed. Polygamy, now being practiced publicly, brought out US marshals, Mormon and non-Mormon mobs, and the ire of the press. The Nauvoo Expositor attempted publishing material critical of Joseph Smith including details of polygamy which led to Joseph mobilizing the Nauvoo legion and declaring martial law and the expositor was burned. Joseph was arrested for treason and was imprisoned and was shot by a mob in Carthage Jail. Following the death, a mob formed to push the Mormons out of Illinois, calling it a "wolf hunt." The state governor used the Nauvoo legion to disperse it but wasn't very successful. In 1845 the Nauvoo charter was revoked and the church became the government calling Nauvoo the City of Joseph. At the encouragement of Joseph's successor, Brigham Young, "whistling boys" would roam the streets widdling with knives, ready to protect the Mormons and attack any strange men found in Nauvoo. The leaders of the Church negotiated a deal to let the Mormons leave unharmed. The moved out west and eventually settled in Utah. By 1850 the Nauvoo temple was burned down and nearly all Mormons had left Nauvoo.
Utah
Mormon exodus from Utah? Indeed many Mormons felt that theocracy, polygamy, violence in Utah, especially with incidents like the Mountain Meadows Massacre, slavery, and other controversial practices were not what one would expect from Christ's true church. Many left to California with the gold rush while other formed Mormon offshoots like the F.L.D.S. However this was in the minority and Salt Lake City now the capital of Utah and Mormonism.
Sources: History of the Church, dictated by Joseph Smith https://history.lds.org/timeline/tabular/chronology-of-church-history?lang=eng Fawn M. Brodie's "No Man Knows My History" https://archive.org/details/NoManKnowsMyHistory Bushman's "Rough Stone Rolling" http://www.nakedmormonismpodcast.com/index.html https://www.lds.org/topics/peace-and-violence-among-19th-century-latter-day-saints?lang=eng Read the footnotes, especially number 8 and 22 https://www.lds.org/manual/doctrine-and-covenants-and-church-history-class-member-study-guide/church-history-chronology?lang=eng