Fencing is what you see being done in these photos of me with Ruin. This is something I personally think all trainers should teach all the horses they start under saddle. This helps teach the horse to be comfortable with someone above them, not just tolerate someone on their backs.
There is another part of fencing that is not being shown. Did not think at the time to get video or photos. It is where you place your upper part of your body over the horse's back and rub them on the side that you are not on. Before ever doing this step you can use your foot, place it on their back. Once they are okay with that then place your leg over their back until you are sitting on their back. Before they move their feet, get back on the rail to give release. Carson James covers this rather well, I have yet to start doing educational videos! I am currently just showing my work!
Something outside of fencing can be done to get a horse accustomed to you being above them. You can use a three tier mounting block and send them around you and the mounting block while you stand on it.
There are a number of ways to help a horse become comfortable with you before you ever get on their backs to once you are on their backs.