The Roman Republic was a phase in history of the Ancient Roman Civilization. According to legend, the city of Rome was founded by Romulus in 753 BC. It was a kingdom until 510 BC, when the last King, Lucius Tarquinius Superbus was overthrown. With that date, the Roman Republic began.
The Roman Republic was very well organized for ancient times. The Roman people elected Consuls, who ruled for a short time. Some of the ideas of the Roman Republic are still used today.
The end of the republic is still a matter of dispute; different scholars will give different dates for it. Usually, the dates of the start of the First Triumvirate or the Second Triumvirate are given. (The Triumvirates were groups of three men who had much power)
The end of the republic is often said to be when Gaius Julius Caesar was appointed as dictator (single ruler) by the Senate of Rome. This happened after a series of civil wars that lasted from about 49 BC to the year 44 BC.
Some people say the republic ended with the naval Battle of Actium between Marcus Antonius and Octavian. They both had been in the Second Triumvirate. It was fought on September 2, 31 BC). Octavian won. Later on, he was proclaimed Roman Emperor. The end date could also be when Octavian was given the title of the first Augustus. This was on January 16, 27 BC.
These are modern views though. In the view of the early emperors, the res publica (what is translated to Republic) still existed. It was simply "under their protection". They promised it would some day, maybe, be restored to its original form, even though this never happened. After the Roman Republic ended, the Roman Empire began.