In a way its similar to training any other animal – training your dog to not pee/poop in the house, but to bark or wait patiently by the door to be let out into the yard.
Its an adjustment from their young colt/foal/pup/kitten carefree days of doing whatever to having to follow rules.
“Breaking” is a holdover term from when they’d rustle up wild horses, so the sudden adjustment to wearing a halter, bridle or saddle – let alone having someone ride on their back – was a rude and unwelcome development and they’d buck and generally have a huge tantrum.
Breaking was “breaking their spirit”. But if your horse was born and raised in captivity breaking is relatively trivial.
The last horse I “broke” was so used to humans (I slept the first few nights in the stall with him and was with him pretty much every day for his first year or so) and seeing his mother be ridden, he didn’t even twitch when the saddle blanket, then the saddle went on. A little anxious around having a bit in his mouth but it passed.
From there it was just a slow progression, going a bit further every day until the horse understands that when the tack or halter is on, its “work time”.
You start off with just putting the tack on (saddle etc.), get them used to that. Then leading them around. Then just having a weight on their back with the saddle but stationary, then maybe around the circle on a long lead with a weight on, then a volunteer human (again, just around in a circle), then learning to take direction with a bridle on and bit in their mouth (i.e. human tugs on the right, you go right), then commands to change gait – trot, canter etc.
Usually takes a few months before I’d consider them “ready to ride”, but you could do it quicker if you have the time and dedication and a relatively eager pupil. Apples and carrots help.
Horses are wonderful and loving, but stupid as posts and more skittish than I am with spiders. But if you and your horse have a good bond and get that trust thing going, breaking in a horse can be relatively easy.
In general, once a horse is broken, they will always remember, although if they’ve been “retired” for a while they might throw a tantrum for a bit.
One of my horses was a rescue draft pony. She hadn’t been put in harness for probably a decade, but we tried one day with a friend’s wagon and she just walked over between the shafts and looked at us like “well? I’m waiting. lets go to work”.