It really depends on the deal that the individual has worked out with the facility. Some instructors want a guaranteed amount per session that they teach, no matter how many people show up. Just for an average guess, they may charge the facility anywhere from $20-50 per class that they teach, depending on what they've agreed upon. OR, they may want a percentage. So using your example above of $20 per participant and 30 participants per class, it's possible that the instructor may work out a deal where they receive, say, 30%... so they would get $180 for that session. The downside is that if only 5 people show up, they only get $30. Still not a bad deal, but you just don't know what your income will be and you're not working consistently, so your actual dollars per hour earned goes down quickly. I honestly don't know what a realistic percentage per hour is for an instructor. More often than not, I'll hear about people charging a set rate per hour. If you teach at more than one facility, you may make a different amount per hour at each place.
As for the length of time of the class and how often it occurs...that's totally up to the demand of the fitness facility.