The JVM exits when the last running thread finishes. In a GUI this typically happens when the last window is closed (which ends the dispatcher thread).
If you set a Thread to daemon status then that thread doesn't prevent the JVM from exiting if it's still running.
So it's used for background threads. Typically these threads speand most of their time waiting for some condition to arrise which they then quietly handle. They might be waiting for an incoming socket connection. They might wake up every five minutes and check that a file hasn't been updated. They might be waiting for some task to be added to a queue which they then execute.