On each horse's page, you'll find the exercise tab. In this part of the horse's page, you'll see the option to pick their training type, jockey, surface, and target distance. If you have contracted a jockey and assigned it to your horse on their manage page, you'll see their name there already. The default surface is dirt but under locking, you can choose to lock your horse into dirt, turf, or alternating (which will train the horse in whichever surface has lower familiarity). Their target distance will list distances from 4F to 12F and will narrow down once you start training your horse in a particular distance.
When you first get your horse from the Horse Trader, you'll notice they arrive in a halter. They will also only have two types of training available, groundwork and saddle training. A horse must be saddle trained in order to move on to more advanced training types and to be able to enter races. The training help link on the exercise page will go into more detail about the different training types and what stats they increase, which exercises use extra energy and which increase distance, surface, jockey and track familiarity.
When you train a horse at a specific furlong, the star above that furlong will go from red to yellow (and with more distance familiarity training, eventually to green). Once the first specific furlong is chosen, the furlongs available for training will narrow down to distances one furlong apart from it. For example, if you start a maintenance training at 8F for a horse, then the list would only allow you to pick from 7F, 8F, and 9F for a second training. Horses can only be trained in three to four furlongs in sequential order. Rarely, some horses with bad genes on either distance can sometimes only be trained for two furlongs. If you ever want to retrain your horse for another distance, simply push the 'X' button under the distances you want to delete.
A horse will be able to trained at least once a month, however you may decide to train your horse more than once but it will require energy, regardless of which type you choose. The only exception to this are yearlings and retired horses. Yearlings can only do groundwork once a month. Retired horses can only be trained up to twice a month (however this will be covered more in the Breeding section).