iPhone 8 or earlier
Double-click the Home button to show your most recently used apps.
Swipe right or left to find the app that you want to close.
Swipe up on the app's preview to close the app.
iPhone X
From the Home screen or while in an app, swipe up and hold from the bottom of the display.
When the app switcher comes up, swipe through the different app cards to find the app that you want to close.
Use a quick swipe upwards to close the app.