My bike shifts gears by itself.
Most modern frames have a socket welded to their seat tube that the front derailleur is bolted onto.
Most front derailleurs also come in a version that can be strapped to the seat tube if the socket is missing. The derailleur should be adjusted such that the cage is parallel to the chainwheels, and just barely clears the tips of the teeth of the chainwheels as it is shifted back and forth. There are two screws in the body of the derailleur that limit the movement of the derailleur. This prevents overshifting, which would throw the chain off the chainwheels. You can exceed the specified capacity of a rear derailleur y a couple of teeth but not more, or the chain will become stuck in unpleasant ways.