Cats use their long whiskers to measure distances.
This lets them know if they will be able to fit through an opening or if they are too big or too large to fit in. The older a cat is, the longer their whiskers will be because they become less mobile with age.
Fun fact: Cats can rotate their ears independently of each other.