Liberalism is an idealist ideology that promotes free market principles, individualism, and fundamental rights (also known as bourgeois privileges). Liberalism emerged as the ideological component of capitalism, and gained administrative power as a result of the bourgeois revolutions of the 18th and 19th centuries in North America and Europe. Liberalism, the philosophy behind the dictatorship of the bourgeoisie, has consistently changed over the centuries, as a result of advancement in the productive forces and the development of the feudal serfdom into the industrial proletariat, and has now turned into neoliberalism, as a result of the consolidation of capital into the hands of the few, and to protect the ruling class from socialism, which is currently in the process of replacing capitalism as the primary mode of production.
Liberalism developed as an ideology and was adopted by members of society as capitalism (or the premises of capitalism) developed. This is generally exemplified by the base and superstructure; as the material conditions develop and factories emerge, there is a need for the superstructure to provide the institutions required for the base to survive. Since capitalism requires the free market to exist, there needed to be a guiding ideology that would allow the free market to exist and justify the existence of capitalism, the base.
Liberalism became codified during the Age of Enlightenment, which lasted from about the mid 17th century to the late 18th century, and culminated perhaps with the bourgeois French Revolution of 1789. Some notable liberal theorists include René Descartes, Jean-Jacques Rousseau, or economist Adam Smith.
In this sense, both social-democrats and classical liberals, who may seem at the opposite ends of a spectrum, are liberals since both will strive towards establishing capitalism.
In modern times, liberalism remains the dominant ideology of the world at large. As it is inextricably linked to capitalism, and capitalism is the dominant mode of production, it follows that liberalism is the dominant guiding ideology in the world.
As the ideas of a society are the ideas of the ruling class (the bourgeoisie in capitalist societies), liberalism has become the only realistic ideology for most people living in a capitalism mode of production, as it permeates their lives from birth. For example, electing class presidents in school shapes students into accepting the liberal republic and the associated electoral process.
Most people therefore do not realize that they are ideological, and that their ideology is liberalism. As they have lived their whole lives in capitalism, it is difficult for them to imagine another system (known as capitalist realism) and therefore that liberalism is the only existing or viable ideology.
Liberalism is considered to be an idealist ideology, as opposed to a materialist ideology, because it claims that ideas shape the material world, as opposed to the material world shaping ideas. In their pursuit for the cult of the individual, liberal philosophers used to embrace the Great Man theory of history, which states that progress is driven by great people who have high natural abilities. Therefore they had progressive ideas, and these ideas shaped the material world. As such, in classical liberal reasoning, Napoleon Bonaparte was instrumental in spreading capitalism and destroying the old order.
Marxism, which is a materialist philosophy, understands that material conditions drive change (the dialectic) and will influence the ideas that people have and how they act on them. Marxism holds that capitalism was instrumental in creating a Napoleon Bonaparte and that, if he had not existed, someone else would have taken his place.
After the impact of scientific socialism in Europe, liberal thinkers started moving away from such idealist notions and co-opted some materialist theory so as to reinforce theirs and prevent communism from becoming a major ideology in the world. As such, even liberal theorists today have to admit that, to some extent, change is driven by forces at large. Liberals admit that the Industrial Revolution largely affected our daily life, in a way that completely modified it from what existed previously (e.g. the division of the work day and the importance it has in a worker's life as compared to the feudal journeyman's). However, they see this progress as an abstract, without relation to the base or superstructure, and would rather focus on the abstract consequences than the material causes. If life changed so much for the average worker after the introduction of the steam engine, it is precisely because the mode of production at large changed and required new policies to create more surplus value.
Perhaps best laid down by Adam Smith, though already existing before his work The Wealth of Nations, free market policies encompass a large range of principles and laws that govern trade inside and outside a nation, so as to remove as many barriers as possible to trade.
Free trade was originally required by the bourgeoisie to destroy the old order of the nobility, who used to own monopolies and form cartels to reinforce their power. Today, free trade is also used as a vector for imperialism, notably in the Opium Wars that sought to dismantle China's protectionist trade policies in the late 19th century.
Fundamental rights, in liberal philosophy, are rights with which all individuals are imbued with on the grounds of being human. They are more aptly described as privileges the bourgeois reluctantly allows the proletariat to enjoy.