The usage of how to to ask a question is a direct translation from the learner's own language: it is not correct as a question in English.
The expression is used in titles, for example "How to win friends and influence people" In English, a how-question is formed by taking a normal sentence, making a question in the usual way (by applying subject-auxiliary inversion ) and then adding how in front of it.
I get a visa I do get a visa - add do because there is no auxiliary verb
Do I get a visa?
- invert subject and auxiliary
How do I get a visa?
- add how
ell.stackexchange.com/users/30978/JavaLatte
Are you talking of asking some guy
How do I kill an insect ? , versus How to kill an insect ? ?
If so, I believe the latter is not grammatically correct.
I think How to is used more in titles and such (not in the question form), for example: How to kill all the insects in your house in less than 3 hours .
ell.stackexchange.com/users/63039/doubleOrt
If you are asking the question directly to a person or group of people then How do I feed a lion?
is grammatical.
However we can also be making the point that it's a problem to do a task and say Ah, but how to feed the lion?
That's the question.
Here we are not explicitly asking a specific person for an answer, though in conversation we are open to receiving answers.
I suspect that these two cases are sometimes confused by non-native speakers.
ell.stackexchange.com/users/16378/djna
The phrase "How to play tennis" is noun phrase.
It does not contain a finite verb and is not a complete sentence.
It is not a question.
It means "the method of playing tennis" Noun phrases are useful: They can be used, for example, as headings in a piece of writing.
They are building blocks of complete sentences
He taught me how to play tennis.
This is a complete sentence with a subject, verb and two objects.
It is not a question.
"How" can also be used in questions, but it needs the inverted verb to be a question.
How does he play tennis?
ell.stackexchange.com/users/24231/James K
In English, whether something is a question or a statement can depend on its context or delivery.
For example: Salesman:
Hey, have I got a deal for you!
Customer:
Really?
Salesman: Really!
Sentence 1 is worded in the form of a question ("Have I"), but the intent is to make a statement.
Sentences 2 and 3 contain the same text, but #2 is a question while #3 is a statement.
"How to" can be used in a question, particularly when someone is asking a question of themselves (e.g. "How to win?"), but its natural function is to cue a reader to expect a heading or title (e.g. How to cook a potato ).
ell.stackexchange.com/users/24861/Lawrence
Can I use “How to” instead of “How do I” when I ask a question? And will it be grammatical?  I often notice some English learners use “How to” when they ask a question.
Can “How to” be a question?
ell.stackexchange.com
<grammar>
ell.stackexchange.com/questions/162104
ell.stackexchange.com/users/70960/user70960
"How to" is used in titles, for example  "How to win friends and influence people".  In English, a how-question is formed by taking a normal sentence, making a question in the usual way (by applying  subject-auxiliary inversion ) and then adding  how  in front of it. For example: How do I feed a lion? This is a direct translation of an appropriate question in other languages, but is not used in English. "How to___" is used as a title of instructions, but a question would usually start "How do I ____?"
This is a direct translation of an appropriate question in other languages, but is not used in English. "How to___" is used as a title of instructions, but a question would usually start "How do I ____?"