Well briefly:
- The English under the Tudors (more so Elizabeth I) saw how the Spanish and Portuguese Empires prospered and wanted their piece. So this is why Sir Walter Raleigh and Sir John Hawkins made their voyages and why the Spanish wanted to invade England. Under Elizabeth I, there weren't many colonies, but then England had become a major global trading country. The first official colony was Jamestown, under James I/VI.
- The English then had wars with the Dutch in the Stuart/Cromwell times, over colonial rights, and gained what was to become the American colonies from them. They also got Jamaica and other islands, and started slave trading in Africa.
- In the 18th century, Great Britain (post-1707 of course) had many wars with Spain and France, and gained what is now Canada from France in the Seven Years War. Of course there was the US Revolution, war with France and then the John Company in India. After Waterloo, the UK's Empire was able to expand in Asia, Africa, and after WWI it gained the Ottoman colonies which are now places like Yemen and Oman.
The British Empire declined (IMO though I'm not a historian) because the USA was able to industralise after its Civil War and as it's a large country had lots of available resources like timber, gold, etc. Germany also started to rival it, and colonist in India more so became disgruntled with rule (leading eventually to Gandhi of course).