These terms describe completely different things. Socialism is an economic system where the state or the government controls private property, or, more specifically, the means of production. Like democracy, socialism is to some extent a political ideal, but it does not involve political participation, and it has economic equality as its goal.
Democracy is not mutually exclusive with socialism, and many would argue that a truly democratic society would based upon economic equality. However, the defining feature of a democracy is the ability of citizens to participate in government. In a representative democracy, the people elect people to represent their interests in government. In a pure, or direct democracy, people themselves would make policy. This form of democracy has generally only existed at the town level. But the crucial element of a democracy is popular participation in government.
Colonialism, on the other hand, involves the domination of one society by another, more powerful society. In some cases, colonies are established and populated with immigrants from the mother country. In others, the colonizing nation simply exercises military and economic power over colonized peoples, often with a small group of administrators, military forces, and elites created from among natives. It is inherently anti-democratic, though colonialists have often defended it by suggesting that they are bringing democracy to people who did not have it before. Socialists have often been anti-colonialists as well. It should be noted, however, that many people who accept the principles of democracy (and, in a few limited cases, socialism) at home have also supported colonialism.