Also can you join sides with any faction. Or is it just the major ones?
For the main quest, you have to choose to align with one of the three main factions - Mr. House, the NCR, Caesar's Legion - or you can choose to go independent (align with Yes Man against the other three factions). You join a faction by helping them out and doing favors for them, and by doing quests for them, most of which involve eliminating, weakening, or allying with the minor factions (such as the Boomers, The BoS, Great Khans, etc.), as well as working against the other main factions.
You can actually keep your options open for quite a while, but at some point you're going to have to decide which of the main factions you choose to help (and it could be none of them) and stick with that. At specific points on the faction questlines, you'll get warnings from the other factions that continuing to do quests for the one you've chosen will close the door on them and make them permanently hostile to you. At that point you won't be offered quests by any of the other factions, they won't accept your help, and they'll start sending squads out to hunt you down and kill you.