You normally use the back button to close an app. If you want to make sure, go to Recents (swipe up on the home button or use the Recents icon at the bottom, depending on how you set your phone up) and wipe that app away.
(It's still going to be in RAM - something has to be in every location in RAM - but that area of RAM is now marked as available, so anything can get loaded into it, and the app isn't using any power or resources by running - because it's not running.)
You can't just kill apps willy-nilly by going into RAM and "cleaning" them (the way some "cleaning" apps do), because some apps load other apps because they use a process in the other app, and there's no reason to have the same code in storage for every app. But killing an app with the back button, or swiping it away, won't cause that kind of problem. (If the app is marked "don't kill" [and that's up to the developer], nothing but a "cleaner" app will kill it. Even Android, when it needs more free RAM, won't.)