The Medici family started out relatively modestly and built their power over the years. People disagree on what business they got their start in, but they eventually got to be involved with textiles and then with banking.
As they rose in prominence, they got to be skilled at making alliances with other families. In those days, this was done through making business deals. But it was also, and perhaps more importantly, done by arranging marriages between the families.
So the Medicis got to be more powerful slowly, by playing the political game of their time and place.