A transfer case is a particular gearbox that lets you shift gears between the front and rear axles. It's designed to help you drive your vehicle in both high and low ranges, depending on your driving conditions.
If you've ever driven on snow or mud with your truck, you may have noticed two different sets of gears; one for everyday driving, high range, and one for low range. High range lets you move quickly over rough terrain, while low range lets you move slowly through deep snow or mud, which can be helpful if your vehicle gets stuck in the mud or sand. The transfer case allows drivers to switch gears between these two sets of gears without stopping.
Transfer cases also come in either manual or automatic versions. Manual versions require drivers to shift between high and low range by using levers inside their vehicle's cab; automatic versions do this automatically based on signals from sensors in the engine compartment, such as those that detect wheel speed.