Unfortunately, there is no magic alliance which covers most airlines
The main alliances are
OneWorld: (includes BA, Iberia, Qantas, AA, Cathay Pacific & more)
SkyTeam: (includes Air France, KLM, Delta, Jet Airways & more)
StarAlliance: (includes BMI, Thai Airways, Singapore Airlines, Air New Zealand, Lufthansa, South African Airways & more)
You join up with any of the airline's frequent flyer programme and you can earn airmiles on the other airlines in the same alliance; there are also partner airlines where you can earn miles
StarAlliance is probably the best as it has the largest membership and a lot more global.
It is useful to know that while Aer Lingus are not in any alliance (used to be in OneWorld), you can still earn miles on their flights on the BA Frequent Flyer Programme as they are partners.
I myself am in two Frequent Flyer Programmes; Air France (SkyTeam) and BMI (StarAlliance); in both cases my miles never expire as long as I earn miles every so often e.g. I have to take a SkyTeam flight at least once every 20 months to keep my Air France miles active.