Democracy can be lots of things, depending of what you are interesting in:
###A way of legitimating the government.
A way of legitimating the government.
One of the most basic problem of politics is why the people should obey their rulers. If it is by force alone, then any actor that amasses some military power may try to create a new government and cause a war in doing so. And at the same time those in power may try to preemptively limit anyone from getting too much power, further adding to instability.
So the question of what makes a ruler THE ruler has had to be answered, and multiple solutions have been found: because he was a close relative of the previous rulers (e.g. Kings), because it was elected by God (or its representatives on Earth), because of some mystical ceremonies (e.g. Dalai Lamas)...
But in the current day, with our science, knowledge and social mobility, many of those old ways have been discredited. We now know that Kings and nobility are not biologically special, that they do not cure illnesses by just touching people, etc.
Elections provide a formal criteria to decide when a government is legitimate or not, that is objective (no "I must be the ruler because God told me to") and caters to the more egalitarian values of the time ("one man, one vote").
###A way of dismissing the government/holding it accountable.
A way of dismissing the government/holding it accountable.
In more autocratic forms of government, there is no direct gauge of how the public feels about the government. This means that a government can follow unpopular policies and believe that everything is ok because they just listen the opinion of the few who profit from those policies. And those who are unhappy know of no other recourse to their situation than to try to overthrow the government by violent means.
With democracy, those who are unhappy with the government can regularly express it and regularly get an effective way of replacing it without resorting to violence. And the government, even if it retains its power, can directly see if its public support increases or decreases.
###A way of involving the citizens in the ruling of the country.
A way of involving the citizens in the ruling of the country.
Closely related to the above, the concept of "popular sovereignty" implies that it is the people as a whole who decide how the country should be governed, but at the also time it creates some stronger ties between the citizens and their country, which replace those between a lord and vassal. It is not coincidence that the liberal revolutions of the 19th were coincidental with the rise of nationalism in Europe; with popular sovereignty the ties between citizen and country become stronger.