Small 12VDC Push-Pull Solenoid
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 fairly small with a 30mm 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 handy mounting tabs making it a great multi-purpose solenoid.
To drive a solenoid you will need a power transistor and a diode, check this diagram for how to wire it to an Arduino or other microcontroller. You will need a fairly good power supply to drive a solenoid because a lot of current will rush into the solenoid to charge up the electro-magnet, about 100mA, so don't try to power it with a 9V battery!