The nucleus of the trochlear nerve is located in the lower midbrain, at the level of the inferior colliculus. It is a motor nucleus, so is located near the midline. The oculomotor nerve and trochlear nerve are the only two cranial nerves with nucleus in the midbrain.
Oddly, fibers from the trochlear nucleus cross over in the midbrain at the superior medullary velum and exit posteriorly. The trochlear nerve then goes around the midbrain, and is visible coming out of the sides.