Tarquinius' son was no better than his father. He raped Lucretia, the daughter of a powerful Roman noble. Lucretia later committed suicide. Following this tragedy, a group of Roman nobles, fed up by king Tarquinius Superbus started a revolt and expelled the king in 509 BC. Tarquinius Superbus was such a bad king, that the word king (rex in latin) kept a bad connotation until the end of the Roman Empire!
Among the noblemen that incited the revolution were Brutus and Collatinus who became the first consuls of Rome, thereby starting the Roman Republic. In the early Roman Republic, religious powers were separated between the Rex Sacrorum (making the annual sacrifice to Jupiter) and the Pontifex Maximus (who had complete religious authority, the equivalent of the Pope today). Judicial powers were given to the praetor. The census which was an important function in Rome was now carried out by the censor. Power was separated between various magistrates who were elected annually, the two most important ones being the two consuls. The consuls also had command of the military.
The Senate already existed during the Roman kingdom but it only had an advisory role. During the Republic, it became more powerful. Various assemblies were also created including the Comitia Centuriata which elected men (at the beginning these men were only patricians but later they also included plebeans) to important offices and which decided on matters of war and peace. A constitution was also written that set checks and balances and that separated powers.
About one hundred years after the beginning of the Roman Republic or in 400 BC, Rome was attacked by the Gauls. The Gauls had entered Italy, gone through Etruria and had reached Rome. In 390 BC they met the Romans at the bank of the Allia River (10 miles north of Rome). They defeated the Romans and then entered Rome. Many buildings in the city were set on fire including the royal palace which housed all the archives and which were lost forever. The city was ransacked and looted and the Gauls occupied it for seven months. But eventually the Romans took up arms and defeated the Gallic army.
Over the following two centuries, Rome expanded its territory and took control of Etruria, the Greek territories in the south of Italy (including Tarentum) and of most of the Italian peninsula.