What is the meaning of Kelly?

A square or hexagonal pipe that is turned in order to rotate the rotary table of a drilling rig.

A roly-poly (toy).

Source: wiktionary.org