Colonialism is a practice of domination, which involves the subjugation of one people to another. One of the difficulties in defining colonialism is that it is hard to distinguish it from imperialism. Frequently the two concepts are treated as synonyms. Like colonialism, imperialism also involves political and economic control over a dependent territory. The etymology of the two terms, however, provides some clues about how they differ. The term colony comes from the Latin word colonus, meaning farmer. This root reminds us that the practice of colonialism usually involved the transfer of population to a new territory, where the arrivals lived as permanent settlers while maintaining political allegiance to their country of origin. Imperialism, on the other hand, comes from the Latin term imperium, meaning to command. Thus, the term imperialism draws attention to the way that one country exercises power over another, whether through settlement, sovereignty, or indirect mechanisms of control.

(Source: https://plato.stanford.edu/entries/colonialism/)

According to Edward Said, and many others, the main difference between colonialism and imperialism is that while the former involves actual occupation of the colonized lands, the latter is the ideology that underwrites colonialism and that can also shape even the contemporary perceptions of the developing world in the West.

Further Reading

Stanford Encyclopedia of Philosophy

Western Colonialism