Solenoids are similar to electromagnets: composed of a large coil of copper wire with an armature (a cylinder of metal) in the center. When the coil is powered, the armature is pulled into the center of the coil. This allows the solenoid to pull (from one end) or push (from the other).
This solenoid is pretty strong with a 40mm long body and a "captive" armature with a return spring. This means when energized with up to 12VDC, the solenoid moves and when the voltage is removed, it springs back to the original position. Many lower cost solenoids are only one type, push or pull, and may not have a captive armature (it just falls out) or doesn't have a return spring. This one even has 4xM3 (metric) threaded mounting holes in the bottom for easy mounting.