"In general there are not "courses" for learning how to become a trainer, most trainers work for another trainer starting at the bottom level job (hotwalker or groom) and working up to assistant trainer. Then you take the "trainer test" in the state where you wish to train when you feel that you are capable. If you already know horses and good horsemanship in general but you are not familiar with racing, you could possibly achieve this goal within several years, about the time it would take to get a university degree."
here is my update to that answer:
There are some ways now to do it a little differently but the old fashioned way is by far the best road to success. There are organizations that offer training for grooms and also trainers but I'd say it's mostly geared toward understanding the rules and regulations. You just can't learn good horsemanship by taking a course, that only comes with real world experience.
There are university degrees for racing related jobs offered by university of louisville and I think university of arizona but a degree is not needed to get a trainer's license - experience is really the key.
Some rich owners and children of influential/wealthy people have been known to "buy" a license without having any significant prior working experience with a licensed trainer, but in my experience these people don't stand the test of time in the business - this road to becoming a trainer is not recommended.
The "racing commission" in each state is the organization that licenses trainers and the racing commission will have an office at any actively racing racetrack, so you can visit that office at any track where you are interested in basing your business - please note - if you go there when there is not a racing meet going on there will generally not be anyone staffing that office. The racing commission will give you information about the licensing forms and tests required in that state.