Carthage was a maritime power and defeating it was not going to be easy for Rome. It didn't have the experience that Carthage had when it came to fighting battles at sea. But after 20 years of fighting, Rome managed to defeat Carthage and a peace treaty was signed demanding war reparations.
All these battles lasted in total more than 16 years. Hannibal's army caused great damage by destroying a lot of Rome's agriculture and supplies. As supplies were running low, endangering the livelihood of Romans, Rome decided it was time to invade Carthage. The Roman forces were headed by Scipio (who had actually fought and defeated the Carthaginians in the first Punic War). The Second Punic War ended at the Battle of Zama in the autumn of 202 BC and with the resounding victory of the Roman army. Rome had conquered Hispania and Syracuse and had now complete control over Sicily.
In 151 BC, Numidia, a Berber-Libyan kingdom (located in today's Algeria and a small part of western Tunisia), attacked Carthage. Carthage asked Rome for help and Rome sent its ambassadors. As Carthage was battling Numidia, the ambassadors evaluated that Carthage had a good chance of winning, that it could then come to dominate North Africa and become a power in the Mediterranean again.
The decision was made to destroy Carthage. Roman ambassador Marcus Porcius Cato said this famous phrase: ceterum censeo Carthaginem esse delendam, translation: furthermore, I think that Carthage should be destroyed. In 149 BC, Rome declared war to Carthage. The reason given was that the Carthaginians had attacked Numidia without Rome's approval. All of Carthage's inhabitants fought bravely against Rome and they resisted well at first. But eventually, general Scipio Aemilianus completely destroyed the city and razed its walls to the ground. The inhabitants of the city that remained alive were captured and all sold as slaves. With the end of the Third Punic War, Rome had control of large North African territories.
Rome had also been focused on conquering the Greek kingdoms. These kingdoms were very developed and sophisticated. One example is the Seleucid Empire which resulted from the division of Alexander the Great's Empire. The Seleucid Empire was a huge Greek empire that stretched from today's Middle East (with the city of Babylonia in what is Iraq today) to northwestern India. It was dominated by Greek elites and by Greek culture and customs.
The Seleucid Empire's expansion into Anatolia (today's Turkey) was stopped in what were some very brutal battles with the Roman army in the 2nd century BC. Eventually Rome conquered the Greek territories (in today's Turkey and the Middle East). The conquest of these territories also had another effect: Rome adopted some of the Greek customs and Roman culture became more refined and sophisticated. Rome also became the sole power in the Mediterranean.