How and when do departments decide who is teaching which course? How and when do departments decide who is teaching which course?

I am a graduate student at a state school in the U.S. The process has never seemed clear to me, as it seems that when none of the faculty particularly want to teach a course, sometimes graduate students are asked if they want to teach them.

I ask because I really like to teach courses, and want to ask if I can teach a 300-level undergraduate course, but I want to know the best time to do it.
The department head/chair is the go-to person for such requests. Sometimes there is a curriculum committee that may or may not have some responsibility for seeing that courses are covered. 

When you ask, it would be useful if you go with a plan and some evidence that you are or will be prepared for it. 

You might also talk to someone who has taught it recently. 

Don't wait to make your request. It may take a while if it is unusual for grad students to teach at that level where you are. 

If the faculty is unionized you might run in to a problem. I've been places where the union for adjunct professors might want to complain even though the regular faculty wasn't unionized.