They get special graduate training in occupational therapy. You’ll probably hear them called OTs. They must be licensed and pass a national exam to be certified to practice.
Some OTs go through more training so they can focus on certain types of treatment, like hand therapy, treating people with low vision, or working with children or older adults.