What does closeApp() and resetApp() do?

On official doc. it only write: Close an app on device for closeApp() and for resetApp() Reset the currently running app for this session.
For closeApp(), does it just close and have to work in the background? Because it doesn’t.
While resetApp() clear data and it has to start a new session?