At its most basic, a democracy is a system of government where leaders are chosen by election, but there are other criteria. After all, Russia, Uzbekistan, and Egypt all have elections, but they are emphatically not democracies. Even the USSR had elections, which were claimed to prove that the government had the support of the people, despite their being totally fraudulent.
Typically, democracies have broad adult suffrage for all citizens. In other words, minority groups (at least those that are citizens) and women have the right to vote. A democracy must also have competitive, free, and fair elections. This means, first, that people may run for office without hindrance if they meet the legal qualifications, regardless of their political views, and the outcome is not preordained by the government (a competitive, free election). Secondly, the election is conducted so that all votes count relatively equally, fraud is minimized, and all major parties have access to media, without the government using private- or state-owned media to reward its allies and punish its enemies (a fair election). An election that does not meet these criteria is fraudulent and undemocratic. This was attempted in Ukraine in 2004, but pro-democracy advocates managed to expose the fraud and overturn the government in a remarkably peaceful Orange Revolution. If an election