1) When you've got a problem, Google it. 98% of the time the answer will be in top 5 links to stackoverflow or documentation. You upvote the answer and question.
2) 1.5% of the time, stackoverflow will have a related question, but either it doesn't have an answer, or the answer has issues.
You figure it out yourself, so you post a comment or answer or just the crappy workaround you used because you ran out of time to figure it out completely.
3) The remaining 0.5% of the time, you get nothing. You post a question, but of course nobody answers because it's an esoteric, hard question. 24 hours later you post an answer to your own question, or more likely a crappy workaround.
And eventually somebody posts a great answer to your question. (Once this happened to me >3 years after I posted it!) It's way too late for you, but it will help the next person with the same problem.
You don't get a lot of karma quickly this way since you're posting esoteric stuff, but you do tend to pick up some badges that are designed to reward this sort of behaviour, like "Populist" and "Necromancer". You do pick up karma slowly and steadily, though. What's satisfying is seeing an answer tick over from zero to one ~12 months after you posted it, realising that you saved somebody hours of frustration.
If you answer an easy question, you've saved somebody a few minutes. When you answer a hard one, you've saved hours or days.