The Nauvoo Temple was originally built in the 1840s. It was not yet fully finished in 1846 when violent mobs forced the Mormons to leave Nauvoo. The structure was severely damaged by arsonists in 1848 and a tornado in 1850. What little remained was torn down for safety reasons. The land remained vacant until The Church of Jesus Christ of Latter-day Saints rebuilt the temple in 2002 - following as closely as possible the pattern of the original structure.
Once a temple was dedicated, Church members considered it sacred and reserved for the faith's highest sacraments, including eternal marriage. Mormons also perform proxy ordinances in the temple, such as baptisms for deceased relatives.
The temple is not open to visitors, but you are welcome to walk the grounds. For more information about the purpose of the temple, please inquire at the Temple Arrival Center just north of the temple. Information is also available at temples.lds.org.