Through a combination of war and diplomacy. They fought with neighboring cities and kingdoms and gradually came out the winners. It took 250 years from the founding of the Republic to establish Roman dominance just in Italy, before they began to move out into the rest of the Mediterranean, so it's not like they just triumphantly marched around conquering everywhere rapidly.
But the decisive difference between Rome and other peoples around them were that the Romans offered alliances with other Italian cities and kingdoms that included granting at least partial Roman citizenship to them (the Italian Right). That enabled them to put their expanding power on a more permanent basis, and enabled them to tap increasing reserves of manpower and leadership talent from the Italian allies. Nobody (including Greek city-states) had thought to extend the idea of citizenship in this way -- conquered people became subjects, not citizens, in other empires.