To leave a guild go to the guild screen and open the Management tab. Click on the "Leave guild" button to leave the guild.
Need more help?