Brake cables are simple components. Generally there are two ways to actuate bike brakes. Mechanical cables consist of an outer housing containing a stainless steel wire pulling on the brake. Hydraulic brakes use fluid plunging through a hose to push pistons that close brake pads around the caliper. In either case, the cable transfers mechanical energy from the lever to actuate the brake.
The type of cable obviously depends on the brake system. Many road bikes almost always use the mechanical "Bowden" cables to actuate their rim brakes, while many disc brake setups on mountain bikes are hydraulic. Both have some pro's and cons:
-more exposure to the elements
-require correct length/tension
-Closed system prevents contamination/corrosion
-stronger braking power
-If the seal is broken, the brakes can fail completely
-Requires frequent bleeding of the fluid/maintenance
Brake cables can be often overlooked. When cycling, sometimes they mean the difference in coming to stop using the brakes, or using your face.
Brake cables vary widely in pricing. Bowden cables can be bought for practically nothing, but if you're serious about getting the best protective or lightweight housing, they can reach over $200. Hydraulic hoses run about the same as mechanical cables, but Amazon.com doesn't offer as much diversity in hoses.
Housing can be made of different materials that can mean the difference in a properly functioning brake, and a functioning brake. Investing in decent brake cables is in everyone's best interest.
Routing brake cables around the frame of the bike is very important. Too loose, you end up lugging around extra (and unnecessary) hardware too short and brake performance is compromised. Handlebar configuration influences cable routes throughout the bike. In general, the cables should be long enough to make wide, sweeping turns en route to the brake. Any tight angles or extra slack will cause unwanted bending which puts stress on the cable.
For the most part, brake cables and hoses come in the same diameter all across the market. That's anywhere from 1.1mm to 1.6mm. It's debated if extra bulk of the cord makes any difference.
Mechanical brakes are called Bowden cables. There's a nylon, rubber, or plastic coating around a protective, flexible steel housing. Within the steel housing is an inner wire of tightly-spun steel lined with nylon fabric for lubrication. At the end of the cable are metal stops to which it is stopped by the brake lever. They run through hollow bolts (called barrel adjusters) that adjust tension of the Bowden cable by loosening or tightening the bolt. Squeezing the lever pulls the cable tighter through the housing simultaneously pulling the brake closed. The outer wire is spiraled (like a slinky) and allows for more dispersed elongation or compression when the brake is applied. This evenly spreads out the heavy load when power is applied for braking, and keeps from snapping the cable.
Hydraulic brakes lines are a bit different.The inner wire is a Teflon hose containing DOT brake fluid or mineral oil. Housing that is a protective wire of Kevlar and nylon to help shield from abrasions or rubbing on the frame. The line is attached to the brake lever (master cylinder) in either open or closed systems. The lever drives a piston that compresses the fluid in the hose. They are actuated in 3 strokes:
Dead stroke: The master cylinder (the brake lever) pushes the fluid together at the other end of the hose, essentially pulling the slack out.
Pad gap stroke: As you might guess, this stroke is when the fluid pushes the pistons, and therefore the brake pads, against the caliper.
Contact and modulation stroke: Ever-increasing pressure is applied to the pads by the hydraulic fluid - which is specially designed not to compress.
Hydraulic brakes are closed from the elements, meaning they will last much longer. However, if the ambient temperature exceeds the boiling point of the fluid, it could expand in the brake line and damage seals on either end. If the hose leaks the hydraulic fluid, the brakes will not function.