Chocolate is made from Cacao beans that come from the Cacao tree (Theobroma cacao), a native species from the tropical south and central America regions.
It is well known that pre-Hispanic civilizations around Mexico and Central America widely used it for different purposes (currency, ceremonies, consumption) but there is evidence that this tree was first grown in the in equatorial South America (Ecuador/Peru) more than 5000 years ago.
Indigenous people used to drink cacao mulled with chiles or other spices. Historical research has proven that one of the most famous Aztec rulers, Montezuma II, was a ‘chocoholic’ and used to drink large quantities of chocolate himself and shared it with his army and court.
Spanish conquerors that arrived at Mexico had contact with cacao and brought it to Spain as a beverage novelty. Spaniards were the first ones mixing the drinking cacao with sugar and that triggered a widespread through Europe.
Different countries have made important contributions to shape the modern concept of chocolate. Records indicate that the first time when the cacao beverage was mixed with milk was in the UK. To produce a solid chocolate that melts in the mouth, a chemist from the Netherlands created a mechanism to extract and add extra cacao fat. In Switzerland the solid form of milk chocolate was invented, and the production process industrialized. French and American entrepreneurs added new enhancements and today we all love eating those chocolate bars that have evolved over time.
Europeans also expanded the cultivation of cacao across other tropical regions in the planet. Now a days the Theobroma cacao tree is harvested in Asia and Africa as well.
There is plenty of literature about the history of Chocolate so if you are interested a quick online search can provide you more information.