It vastly differs depending on how much funding your state gives to post-secondary institutions, how much the individual school gets in grant money, what their spending is directed towards, the quality of the school, the amount they give you in scholarships, the amount of non-school-specific money you get from your state, even things like which dorm you live in and which meal plan you get can change things by hundreds or thousands of dollars.
The only real rules are:
-Out of state = more expensive
-Lower-quality dorms = lower cost
By the 'price of classes' do you mean tuition? Because tuition is far and away the biggest cost almost everywhere, unless you get a scholarship.
But yeah, even within state schools you'll see pretty divergent costs; my university is a state school and the total cost per year before scholarships and such is ~$15,000 (with me living in the cheapest dorm and using the cheapest meal plan), but there are public universities in my state that can approach double that, and private schools that can hit upwards of $60,000 per year.
One thing to consider, if you do your research beforehand re: transferring credits and such, is to do two years at a community college for all of your gen-eds and transfer those in to the state school you want to attend for your major-specific courses. Obviously only do this if you've talked to people at the latter and know that you'll be able to get transfer credits.
Usually your best bet will be to target a smaller (but not tiny) state university which offers you good scholarship money, preferably one which still gets decent grant funding, at least if cost is an issue. Your goal there is to balance out the cost of attendance with the quality of education; a school which is really small and has little/no funding for research isn't going to give you an acceptable environment or education, but a really big school with 30k+ students is also not going to give you a good education unless you're super-good at networking and get into a lot of field-specific courses with professors who know you personally.