When creating teams for single player missions in Stronghold Crusader 2 maps, you need to access the 'Teams' section under the 'Factions tab'. Here you can assign numerous AI into teams, though you cannot create mixed alliances between the different lords. For example: You could not assign yourself or another lord to be in two separate teams or to be aligned with every other lord on the map, as there needs to be at least two clearly defined groups. These teams are not defined through the Event editor.

If you are trying to assign teams in Multiplayer or Skirmish maps, it is just done through the in-game lobby system. Multiple teams can be set up quite easily by just dragging one lord over another lord, though this still means that you cannot have a single lord in multiple teams, he /she can only only be part of one faction.