The best experience in the game is to be part of an Alliance. As such, you cannot be outside of an Alliance, but you can switch in between them.
To switch, go to the Alliance menu, then tap on the button just bellow the "Research" tab.
On the next screen, there will be a red button at the bottom that says "Change Alliance*"
Then you can search for other Alliances and Join, or create your own.
NOTE: If you are the Leader of an Alliance, you can't switch to another, as Alliances cannot be without a Leader. If you want to leave, you can kick everyone out from the Alliance and then switch to another one.