This has everything in it on how to ask questions correctly.
In short, it can be summed down to this:
- Do your own research first.
- Include things you have tried and thought of before asking the question.
- Be explicit about what you want to achieve in the end and provide as much information as possible to help.
- Respect other people's time.