Short answer
Drag the app from Applications to the Trash, then look for the files it left in your Library folder and remove the ones that belong only to that app. The app itself is usually a small part of what it uses. Be careful with anything you cannot match to the app.
Drag to Trash, or use Launchpad
Open Finder > Applications, drag the app to the Trash, then choose Finder > Empty Trash. For apps from the App Store you can also open Launchpad, press and hold the app until the icons shake, and click the delete button. Launchpad only offers this for App Store apps.
Apps with their own uninstaller
Some apps, such as those that install system extensions or background services, ship an uninstaller in their disk image or in their own folder. Run it first, and check the app’s support page for steps. It removes parts that you cannot find by hand.
Where leftovers live
Apps keep files in your Library folder. Open it with Go > Go to Folder (Command-Shift-G) and type ~/Library. The usual places are:
~/Library/Application Support~/Library/Caches~/Library/Containers~/Library/Group Containers~/Library/Preferences~/Library/LaunchAgents~/Library/Saved Application State
How to match leftovers to an app
Folder names usually follow the app’s bundle ID, such as com.example.AppName, not the app’s display name. Read the bundle ID before you delete the app:
mdls -name kMDItemCFBundleIdentifier -r /Applications/AppName.app
Then search the folders above for that ID. Names that match exactly are the app’s.
What to leave alone
Group containers can be shared by several apps from the same developer. If a folder name does not clearly belong to the app you removed, leave it. The same goes for anything you are unsure of. An unused folder costs a little space; a wrong deletion can cost an app its data. What is safe to delete in the Library folder goes through each folder.
Login items and background items
Removing an app does not always remove its background parts. Open System Settings > General > Login Items and check both Open at Login and Allow in the Background for entries from apps you removed. Turn them off or remove them there. For more ways to recover space, see Mac storage full: what to check first.
What JunkTrace does differently
JunkTrace has an Uninstaller that removes an app and the files it left elsewhere. You see each part before it goes.