Onix has a magnet in its brain. It acts as a compass so that this Pokémon does not lose direction while it is tunneling. As it grows older, its body becomes increasingly rounder and smoother.
As it digs through the ground, it absorbs many hard objects. This is what makes its body so solid.