[Java][JVM] JVM internals basics - Stop-the-world phase (safepoints) - how it works?

[Java][JVM] JVM internals basics - Stop-the-world phase (safepoints) - how it works? Why does the JVM need STW phase?