This is highly vendor dependent and not necessarily shared.
HotSpot is open source and demonstrates directly how it is done. Jikes RVM is a JVM written in Java which might be easier to dive into. JamVM is a tiny JVM written in C which - due to its size - might also be easier to dive into.