You’ll have to be invited by the leader of the alliance.
In the chat interface on the bottom left the rightmost buttons are for the alliance and friendslist interface. When you get an alliance or friend invite the corresponding button will flash. When you then open the alliance window you’ll see the invite on the top of the window. There you can accept or ignore the invite.
To form an alliance yourself you have to have a certain reputation level. Then you can create your alliance in the alliance window. You’ll have to pick a name and tag and pay a small fee.