Android doesn't really have such a thing as quitting an app. You're meant to just stop doing stuff when off screen, and let your app be evicted in LRU order (or whatever order is actually used). If your app does background stuff you should have a settings toggle to do the background stuff or not, and when it's on and the phone is on, you do the background stuff.
This closes an activity - the user interface of an app - not an app. In Windows terms, this is DestroyWindow, not ExitProcess.
You can also exit an Android process, of course. It's probably what you're looking for, but it's weirdly inconsistent with the overall user experience and you should try to make something consistent instead. Even closing a top-level activity is weird.