Assuming you mean World of Warcraft, leaving a guild is easy: type "/gquit" into the chat bar and press Enter. A confirmation will pop up, and you'll be out of the guild.