Is it better to say "How do I..." or "How can I..."?
"How can I" implies "How am I able to" or "How would I be able to", which is a request for information explaining possibility, the answer to which would usually contain instruction. It is semantically similar to "How do I", which is on its face a request for instruction. So, like Robusto said, they're basically interchangeable; they both sound right in virtually all questions of this type.
EDIT: There can be a slight difference in implication. "How can I do that" can be taken to mean that you didn't know you could do that, which can be asked rhetorically to imply that doing something is so against one's nature they do not believe it possible. "How do I do that" implies that the speaker knows or believes it is possible, but simply lacks instruction as to procedure. However, even in the rhetorical, the question "how do I do that" implies that even though the speaker is aware of the general possibility, doing something is abhorrent or contrary to their nature such that they would not know how to do that thing.
It doesn't really matter, they mean pretty much the same thing.
How do I get this jar open?
How can I get this jar open?
Either is understood to mean that you want to get the jar open and are soliciting suggestions or actual help.
N.B. There is nothing ungrammatical in English about the construction "How do I ...?" Even
How do I do this?
while slightly repetitious, is perfectly grammatical.
Both are grammatical and convey the intent clearly. "How can I?" might be a better choice when there are multiple ways to do something and you're asking how you specifically can do it. Example:
"You'll need access to the data on our server."
"How can I get that?" (i.e. I'm an outsider and can't just walk into your server room)
"I'll burn you a CD."