Take it as far as you can. If you come up against a wall that you can't solve by reviewing the book or materials, then your best resource is someone else in the class, followed by a TA, followed by the Professor or Teacher.
If you have a short, well-documented issue, then post all details here.
The stackoverflow site is a good resource, but mostly you want to search it for your issue, not post a new one. People there are quickly annoyed at elementary questions and flag them as duplicates.