How does a suction cup hold objects in place?

A suction Cup will trap air behind itself which causes a partial vacuum. The negative pressure of trapped air or water causes it to keep in contact with the surface it is against.