On August 28, 1833, the British Parliament passed the Abolition of Slavery Act. This law was a follow up to an earlier law passed in 1807 which abolished the slave trade. This law, which took nearly twenty years of work by abolitionists, made it illegal for British subjects to buy or sell slaves. This site gives a good overview of the beginnings of the abolition movement in Britain.
British captains were fined £100 for each slave found on board. As you can imagine, this did not necessarily stop the slave trade, it just meant that the slave traders had to find other ways to buy and sell slaves. And if a trading ship were about to be caught with slaves on board, they frequently just threw the slaves overboard, rather than risk the fine.
The passage of the abolition act in 1833 meant freedom for any slave within the British Empire, with “reasonable compensation” to their former owners. What your compensation was depended on how many slaves you owned. For example, the Bishop of Exeter had 665 slaves, and was given £12,700 in exchange for their freedom. In practice, this meant that in the British colonies, any slave over the age of 6 went from being a slave to being an “apprenticed laborer”. Slaves living in the United Kingdom of Great Britain and Ireland were free. The apprenticeship would expire in 1840. The law goes on to include a restriction on the number of hours the laborers could work. A full text of the law can be found here.