Andriod
To close running apps on Android, swipe up from the bottom of the screen (or tap the multitasking/recent apps button), then swipe up on individual apps to close them, or select "Clear all" to close all apps. For frozen apps, go to Settings > Apps, select the app, and tap "Force stop".
iOS
To close running apps on an iPhone, swipe up from the bottom of the screen (or double-click the Home button for older models), then swipe up on the app preview card to force close it. You can use multiple fingers to close several apps simultaneously.