Gear shifters operate the derailleurs and therefore gear functionality of your bike. The shifters pull cables to move the derailleurs. Twin-lever triggers (one for up, one for down) are the most popular choice, such as Shimano's Rapid fire shifters, but you'll also find twist shifters, such as Grip Shift, and integrated brake lever/shifters.
Early shifters were simple levers with friction devices to keep them in place. Then indexing came along and the levers got distinct clicks, providing helpful feedback for each gear change. Next, the simple lever evolved into a pair of levers, one to change up the gears and one to change down. These days, the field of shifters has settled down somewhat. The under bar trigger is the dominant design on mountain bikes and hybrid bikes, although integrated Dual Control brake levers and twist shifters still have niche appeal.
Twist shift users can opt for different length fixed grips, setting their hands closer together or further away from each other. Triggers can be set at different positions or angles relative to the brakes, and some models can be fitted inboard or outboard of the levers too. Test and see which set-up works best for you.
Shimano and SRAM are still dominant for the component parts on bikes and these usually need to ran as whole group sets to work properly. Shimano uses a 2:1 actuation ratio (two units of cable pull give one unit of derailleur movement), while SRAM uses 1:1, so they won't work together. SRAM does sell Shimano-compatible versions of its trigger and twist shifters, though should you prefer the feel.
Road bikes have a similar system to mountain bikes however the gear shifters are almost always combined with the brake levers and are referred to as STI shifters (Shimano Total Integration). Some of the very basic road bikes come without this type of shifter and still use a friction shifter but to use a road bike as it was intended then you should aim to buy a bike with this type of shifter fitted. Not only can you change gear and use the brakes in the same hand position but the gears change more smoothly and the brake lever applies more power to the callipers at the rim. The hood of this type of shifter is also more comfortable than the older style. As with mountain bikes different brands aren't compatible. SRAM and Shimano can swap chains and cassettes but that is it. Campagnolo must be run as a full Campagnolo set up as all parts have different spacing and ratios.