The Science on How a Suction Cup Works
Imagine that everything and everybody on earth is completely surrounded by an ocean of air, which puts pressure on both the inside and outside of everything. When you press a suction cup against a wall or window, you push out the air inside it, eliminating the pressure inside the suction cup and creating a vacuum which seals the cup tightly to the surface you want it to stick to. A suction cup will come off when the air pressure on the outside becomes lower than the air pressure inside the suction cup. You’ll hear a “pop” sound when you pull a suction cup off the wall…that’s the air rushing in to fill the vacuum.
In scientific terms, gravity and friction are the two main forces that make it possible for suction cups to work. Gravity pulls the molecules in the air toward earth, creating atmospheric pressure of roughly 14.7 pounds per square inch at sea level. A good cup on a slick surface causes that pressure to be applied to the outside of the cup, pushing it down onto the surface. Friction keeps the cup from sliding.
To calculate the force of a suction cup, use the formula
F = AP where F = force, A = area, P = pressure.
This is derived from the definition of pressure, which is
P = F/A
For example, a suction cup of radius 2.0 cm has an area of (0.020 m)2 = 0.0013 square meters. Using the force formula (F = AP), the result is F = (0.0013 m2)(100,000 Pa) = about 130 newtons, assuming the pressure inside the suction cup is negligible when compared to atmospheric pressure (about 101,000 Pa). 
Modern suction cups are made of highly flexible synthetic materials such as PVC plastic or neoprene. Prized for their reliability, these materials are preferred to natural rubber because they are stronger and more resistant to sunlight, abrasion and temperature extremes. Earlier suction cups were made of natural rubber, and the very first suction cups were made of glass or gourds.
These handy devices are designed to conform to the shape of the surface that they are stuck to, and will adhere best to surfaces that are smooth and non-porous, like metal or glass.