When you are done reading a message inside the Mail app of your iPhone (or iPad or iPod Touch), you would swipe and move that message out of your Gmail Inbox.
This swipe action will show an Archive button that you can tap to quickly move that email message from the Inbox to the All Mails folder. This is the default setting in iOS.
Choose Between Delete and Archive
If you are more in favor of deleting emails that you have read and not archiving them, you can change the default setting of the Mail app such that it gives you the Delete option on swipe and not Archive.
How? On your iOS device, open Settings, tap Mail, Contacts, Calendars and then tap the email account that you wish to change. There you’ll see an option that says Archive Messages. Turn it off and now you can send your messages from the Inbox straight to the Trash folder.
The above is relevant to Gmail and Google Apps accounts. If you have configured Yahoo! Mail on your iPhone, swipe provide the Delete option and there’s no way to change that.