If the app has crashed or appears unresponsive, right-click its icon and hold Option, then click on Force Quit. Apps like Steam often run by default in the background, sapping resources. Get into the habit of closing thirsty apps like Photoshop or Excel when you aren’t using them. You can also use File > Quit, or use the Command+Q keyboard shortcut while the app is focused. You can right-click, Command-click, or two-finger tap an app icon in the dock and click Quit to end the process. Running apps appear in the dock with small dots next to them. You may have only closed the window, and the app is still open as signified by its presence in your dock.
In fact, most Mac apps will stay running in the background when you close their windows. Clicking the red “X” in the corner of a window won’t always close a Mac app.