You can pledge your squadron to any faction (either a player-created faction or one of those initially placed by Frontier), if you are allied to them. You can only pick one faction for your squadron, however.
You work up to Allied (from Neutral, then on to Cordial, then Friendly, then Allied) by gaining reputation points with them. Run missions for them with REP rewards (the more plusses, the better). If they are the controlling faction at a station, you also gain reputation by handing in cartographics data or trading with them.