Beginner courses generally cost $125 and last six hours.
MSF offers the most widely available dirt bike classes. If there isn't one in your area, use a reputable search engine to find a course through another organization. You can find a course through a local motorcycle dealer too.
Take beginner courses as many times as you want. You should feel comfortable and confident on a dirt bike before moving forward. Once you feel comfortable, try a more advanced class.