Once you start a game, use the right bumper (xbox) or player info button (scroll button -winphone & win8) to bring up the player info menu.
From there you should see instructions to form an alliance - you can use each other summon shrines, form walls together, heal each other,etc. when you're allies. And just go back to the menu to break the alliance - there can only be one winner after all.

This only works in deathmatch & not team deathmatch.