You can’t really appreciate how good a properly functioning brake pedal feels until the day you press it and it just goes straight to the floor with no resistance. Unfortunately brake line failures aren’t as rare as we’d like them to be; off-road driving is pretty tough on vehicle systems, and your brake lines are no exception.
Brakes work through a sealed hydraulic system. The whole system is filled with fluid, and when you push the pedal more fluid is forced into it from a reservoir. That increases the pressure and operates the brake pads (or shoes, if you have drum brakes).