To enable the undo send feature, click on the gear icon in the top right hand side of your Gmail inbox and select "Settings" from the menu.
Scroll down until you see "Undo Send" and click the box to enable it. You can then use the drop down to set your desired time frame for the undo. You will only have that amount of time to click undo before you lose the option.
Scroll to the bottom of the page and click the "Save changes" button.
Now when you send an email, you will get the normal message at the top of your screen that lets you know the message has been sent, but now it will include a link to undo. After the time frame you selected has passed, the undo link will disappear.
The reason you only have a certain time frame to undo the send, is because it isn't actually sending your email when you hit send. It waits for the time frame you selected before it sends the email, which is what gives you the chance to undo the send.
This feature has come in handy for me several times! I hope you find it helpful as well.