It varied on what the political situation was. In Asia, more precisely in India, colonization came as a result of trading with western companies which eventually made the whole place dependent on trading with the west and made the companies rich enough so that they could subjugate the locals.
In Africa, colonization mostly occurred due to the need of resources. In some places like the continental parts of Africa it was about physical resources that required mining and similar things. In coastal Africa, it was about the workforce with the slave trade running rampant and a lot of money being involved.
South-East Asian countries that were colonized were often colonized as a response to enemy occupation or freeing them from other colonizers. For example, places like Vietnam and Philippines were occupied during wars and colonization came by providing help to the local population in fighting those wars after which they remained colonies of those who helped them.