How to close an app properly on iOS

To close an app on iOS, simply switching to another app does not close it. It is still running and consuming RAM.
This Apple KB explains how to close it properly on iOS7.
On iOS6, use this method.