The Spanish language emerged during the 7th century in regions north of Spain that had not been conquered during the Moorish invasion. Just like all romance languages, its roots are in Latin, though through the years of prolonged contact with Germanic and Arabic languages, it evolved quite differently than its French and Italian counterparts.
Much later, when the Spaniards ‘discovered’ the Americas, the language of Spain (Castilian Spanish) had emerged and become the standard speech of the explorers. During colonization, the indigenous inhabitants of Latin America were forced to learn Castilian in order to cohabitate. As to be expected, the natives exerted a great influence on the Spanish language and the Latin American Spanish dialect emerged.
In the late 1800s and early 1900s, the influence of American English on Latin American Spanish started another language revolution, changing pronunciation and even vocabulary. Even though this created significant changes in the Latin American dialect, most experts would agree that the differences between Castilian Spanish and Latin American Spanish are still equivalent to those between British English and American English.