A suction cup is a flexible, curved object — often made of plastic, but octopuses have natural ones — that, when pressed against a flat surface, pushes out all the air between the cup and the surface to create a vacuum. The pressure difference between the inside of the cup and the outside holds the cup in place.
That force is astonishingly powerful. The amount of weight a suction cup can hold is equal to the surface area of the cup multiplied by the pressure outside it (i.e., atmospheric pressure). All a climber needs to get up a wall is a few of those cups and a healthy faith in the power of physics.