Grammatically there are two main kinds of question, those inviting a yes/no answer, and those asking about a specific thing. The former are called polar questions or more usually yes/no-questions:
Is that your bag?
Did Mary kiss John behind the bicycle sheds?
The latter may be called focal questions because they put the focus on some element of the sentence, but are almost always called wh-questions, from their characteristic beginning in English, even in linguistic discussion of other languages:
What did you see yesterday?
Who threw that?
Where shall we go?
How many bottles did Mary say John drank?

yes/no-questions

Here are the positive statements of the same thing in Swahili, French, Japanese, German, Latin, and English, which illustrate the range of strategies used:
John alimwona Mary.
Jean a vu Marie.
John-ga Mary-o mita.
Johann sah Marie.
Johannes Mariam vidit.
John saw Mary.
Now here are the corresponding yes/no-questions:
John alimwona Mary?
Est-ce que Jean a vu Marie?
John-ga Mary-o mita ka.
Sah Johann Marie?
Viditne Johannes Mariam?
Did John see Mary?
Swahili uses the simplest method, just a rising intonation. Most languages allow this as an alternative, but in some it is the only method used. French has several methods but the ordinary one is to put a question element at the beginning of the sentence. In Japanese the question element is put at the end.

The next three styles involve movement. German has inversion of the subject and verb. In Latin the element questioned is brought to the front, and a particle is suffixed to it; you could also question who did the seeing (Johannesne Mariam vidit?) or who was seen (Mariamne Johannes vidit?).

English has a more complicated and mixed system. If the positive sentence contains an auxiliary (is, will, could etc.) then subject-verb inversion is used as in German, otherwise an auxiliary do is introduced, takes the tense and agreement off the main verb, and is inverted with the subject.

wh-questions

In these some element of the sentence is replaced by a question word. This is of the same grammatical type as the element replaced and stands in the same grammatical relationships. For example if a noun is replaced and the language has case marking, the interrogative element is subject to the same kind of case marking.

Some languages, such as Japanese and Chinese, keep the interrogative in the same place as the original. These are called wh-in-situ languages. Here is an example from Japanese, which happens in addition to add the yes/no question marker:

John-ga Mary-o mita. = John saw Mary.
Dare-ga Mary-o mita ka. = Who saw Mary?
John-ga dare-o mita ka. = Who did John see?
More common is for the questioned element to move to the front of the sentence. This can be grammatically quite a complicated operation. In English the interrogative goes first, then if it isn't the subject it's followed by inversion of subject and object as with yes/no-questions. Also as with them, this inversion only applies to auxiliaries, so if there isn't one the auxiliary do has to be added in this position, and gains the inflection. This is illustrated in the English translations of the Japanese above.

An 'element' of a sentence, as I have been loosely calling it, can be a single word or a more complex construction. The technical term is constituent. An entire large constituent can be questioned, or a smaller constituent within a larger one, and this can affect how much is brought to the front. When the movement of a question word brings other elements tagging along with it this is called Pied Piping:

Mary sold many books. How many books did Mary sell?
* How many did Mary sell books? -- is ungrammatical
Here is questioning of an entire constituent noun phrase, then movement of a smaller constituent out of it:
Mary drew a picture of John. What did Mary draw?
Who did Mary draw a picture of?

indirect questions

The ones so far have been direct questions, where the speaker expects an answer from the hearer. A rhetorical question is phrased just like a direct question, but pragmatically the speaker doesn't really expect an answer. In contrast, an indirect question is where the questioning is being attributed to some person (or possibly to oneself):
What did Mary draw?
Susan wondered what Mary drew.
The main sentence is a statement, not a question. Embedded inside it is a question. In English the interrogative is moved to the front of the clause but does not trigger inversion or do-insertion: it is a common foreign learner's mistake to use those, giving the ungrammatical *Susan wondered what did Mary draw. This doesn't sound so bad sometimes, because the outer clause can be regarded as parenthetical:
What did Mary draw?
I wonder what Mary drew.
I wonder, what did Mary draw?
What did Mary draw, I wonder?

echo questions

Normally languages like English move their interrogatives to the front, but in some circumstances they can behave like Chinese and Japanese and leave them in situ. These are called echo questions, because they are used to echo most of a previous statement. They are also used as quiz questions, with emphatic focus on the question element:
You ate a what?
George Orwell was born in which country?

tag questions

A tag question is a short one tagged onto the end of a statement to ask for confirmation of it. Many languages append the word for no? or use a simple phrase that translates to something like isn't that right?: such as German nicht wahr?, French n'est-ce pas?, Italian non è vero?.

Although some dialects of English may have something that can be used like this (Canadian eh? and Cockney innit?), standard English uses a much more complicated system. The auxiliary of the main sentence is negated and inverted, and if there is none, once again do is inserted. The verb is fully inflected and agrees with the repeated subject, which is turned into a pronoun if it isn't already:

Your mother is here, isn't she?
The dogs will bite, won't they?
The dogs won't bite, will they?
I said so, didn't I?

wh-islands

When brought forward to the beginning of a sentence, wh-words can move long distances, across multiple clause boundaries, but there are barriers to what they can cross. For a start, in English only one question word can be moved forward: there can be more than one in the question, but the others remain in situ. Such questions expect what are called pair-list answers:
Who bought what?
Who put what where?
What did Mary put where?
(She put the letter on the table, the bread in the bread-bin, and the apple in the fridge.)
The reason given for this in the X-bar Theory of syntax is that the wh-word moves to a specific empty node in the tree structure for the sentence, the specifier of the CP. Once that place is filled there is no suitable landing site left for further movement.

Also, long distance movement appears to occur by successive or cyclic applications of short movements to the front of each clause, leaving behind a trace at each place where it's been. Each such trace has to be grammatically governed -- the details of how being open for discussion in current versions of X-bar Theory. This can be used to explain why some long-distance extractions are possible, while others are not, confining the wh-word into a region called an island. A notable oddity of English is that the complementizer that can normally be kept in or left out without difference to meaning, but its presence or absence affects the grammaticality of wh-movement.

John said Mary bought some cheese.
= John said that Mary bought some cheese.
What did John say Mary bought?
= What did John say that Mary bought?
Who did John say bought some cheese?
* Who did John say that bought some cheese? -- ungrammatical!