Like large area rugs? I have a steam cleaner and do them about once a year.... Unless they need it sooner (pet or child issues)... Smaller bathroom and throw rugs get done in the washing machine every few weeks.....
Spray some baking soda and water on it, wait like 15 minutes, then hoover the whole thing and tadaa ! All clean. But i'm only talking of the small carpets we have in bedrooms, for allergy reasons we got rid of the bigger ones.
Large area rugs get done 4x a year with our steam cleaner. Smaller rugs are also done the same way unless they were meant to go in the washer. Small rugs that are under $10 to purchase, if they get really bad, they get replaced - they go to the garage and then the garbage.