There are many different forms of sugar, but the granular stuff we put in our tea and cakes is a type known as sucrose. Sucrose is found in high concentrations in both the stems of sugarcane and the bulbous roots of sugar beet, and over the years humans have found ways to extract it and use it as a sweetener.
Sugarcane was the first to be used and was initially chewed in order to extract the sweetness. A type of tall grass, it is guessed that it was first cultivated in New Guinea some 10,000 years ago before spreading back along the route of human migration north west to India as well as east into the Pacific.
According to Chinese manuscripts, India introduced sugar to China around 800 BC. India had hit upon a way to extract the juice from sugarcane and made cakes of "stone honey", which became highly prized luxury items in China.
The next steps westward included Persia in AD 500, Arabia around AD 600 and to Egypt around AD 700. In Egypt, a more elaborate form of processing and refining sugarcane was developed before it pressed on westwards again along the north coast of Africa to Morocco and into southern Spain in AD 755
Other European countries encountered sugar from samples brought back by crusaders and by merchants- Venetians in particular made plenty of money from the luxury foodstuff, with Venice acting as a hub for the trade and shipping of sugar.
Perhaps due to its position as an island nation, England did not encounter sugar until comparatively late, at the beginning of the 14th century, when Traders from Venice began to establish a more regular trade of sugar with us.
Throughout this period of history, sugar was very much a luxury item, reserved for those who could afford such extravagance. This began to change as sugar was introduced to the New World.