A brake controller is usually an original equipment manufacturer or aftermarket-installed device or module.
It is mounted to the tow vehicle's driver's-side dashboard area, and engages a trailer's electrical braking system either time delayed, or in proportion to the tow vehicle's brake engagement when slowing down or coming to a halt.
Most basic brake controllers will generally have a plus-minus gain adjustment.
The tow vehicle operator sets the gain as high as possible but without the trailer brakes locking up after making a few test stops.
The heavier the trailer, the higher the gain adjustment is set and therefore the less chances of wheel lock-up.