It's embarrassing to admit this, but I don't know enough about the actual economic mechanisms that made colonial domains turn a "profit". We often see articles around with headlines such as "British took 45 trillion USD from India", but what was the actual process of extracting that wealth like? Where did all this money go to (company shareholders, the government coffers, a local aristocrat, etc.?), what actually made the colony lose wealth while the Metropole gained it?
No need to be embarrassed about it at all, none of us are born knowing everything.
Whilst specifics will vary from colony to colony, we can use the British occupation of India as an example, as it covered a lot of bases, and as a Brit we do receive some education in our history over there. And many of these methods hold true for other colonies throughout history. I should stress though that this is not a comprehensive coverage.
Firstly, commodities. A large amount of wealth is extracted very directly via monopolisation of goods. Commodities such as salt, tea, spices, etc... may be seized, sometimes with a mandatory contract at below-market rates, or otherwise directly via military intervention. Manufacturers have no choice but to sell their goods to one buyer (the coloniser) at a rate that is dictated to them, and this is either sold locally at an inflated price, or shipped off to be sold at a profit elsewhere.
The transfer of wealth here is in actual goods or hard currency, collected by local government authorities and literally shipped back to the colonising country. One of the changes enforced under colonisation was standardisation of currency. It didn't matter whether they were rupees or pounds being shipped back - they had a known composition of silver or gold and had an exchange rate.
(The state of India's currency at the time, as well as Britain's attempts to "fix" it, could take up a whole post in itself)
There is also suppression of local industries that may be competitive to the occupying country. India's fabrics industry was very significant pre-colonisation, among the very finest in the world, and a major competitor to Britain's own fabric industry. Once able to effect a monopoly on India's trade, the East India Company was able to impose various duties, blocks on exports, as well as destroying many looms in parts of the country. It then brought in cheaper, inferior British cloth to sell to Indians, who then had little choice but to buy them.
Transfer of wealth here is less literal, but still evident. An enforced replacement of existing markets by an occupying one, with profits from sales going to the EIC or Government, increased sales for Britain's company owners, and more jobs in Britain due to increased demand. All very much at the cost of India's own industries.
It's worth noting there is a process in play here - extraction of cheap raw materials from the colony, processing them, and then selling them back to the colony at an inflated rate. None of which the colony has any choice in.
As well as goods, value is also extracted via labour. Rates for labour can be dictated as easily as rates for goods, and Indian's large and less educated population was seen as a source of cheap indentured labour. A 5-year contract to work in one of Britain's colonies overseas would be signed, though the signator would often be illiterate and sign via a thumbprint. Many would be unaware of the conditions of where they were headed to, as may have been lied to about the contents of their contract - some not even aware that they would be leaving India. Many would not be able to afford voyage home afterwards, and have little choice to continue working until they could. Whilst the Empire had outlawed slavery, for the duration of their contract there was little difference for over a million Indians besides technically receiving a token payment.
In the context of your question, it is worth noting that Britain's rule over India started with a private entity - the East India Company. Initially all these profits would flow through them to their shareholders, and through taxes on their profits to the British Government. After mismanagement and attempts at revolt, Britain nationalised the EIC and India became ruled directly by the Crown following the Government of India Act 1858, cutting out the middle men and the Treasury receiving the profits directly.
Sources:
The Great Hedge of India - Roy Moxham
Speeches & documents on Indian policy, 1750-1921 - Arthur Berriedale Keith
The Cambridge Economic History of India: Volume 2, C.1757-c.1970 - Dharma Kumar, Meghnad Desai
Edit: typo