A republic is a form of government, in which the head of state is no monarch who is born to become leader of the country. In most republics the head of state is called a president and is chosen by the electorate in elections. These republics are democracies, but a republic can also be a dictatorship. Examples of republics are Germany, France, the United States and Russia. Countries in which the leader isn't chosen, but is born to become leader of a country, are called monarchies.
Not all republics are democracies. Countries like China, North Korea and in the past the Soviet Union weren't democracies. Most countries became republics after they abolished the monarchy (like Italy, Greece and Nepal) or became independent (like most American, African and Asian countries). A few countries abolished the republic and became monarchies later on. An example is the Roman Republic, which later on became the Roman Empire. The Netherlands were a republic after the independence from Spain, but are since 1815 a kingdom.