The holes on a clarinet are called tone holes. When a tone hole is opened, it allows some of the air to escape from the air column, which shortens the column and raises the pitch of the sound. When a tone hole is closed, it blocks off the escape of air from the air column, which lengthens the column and lowers the pitch of the sound.
The specific pitch of each note is determined by the length of the air column and the tension of the reed. The tension of the reed is controlled by the player's embouchure, or the way they hold their mouth and blow into the mouthpiece.