I know that the order of the words has changed to form an interrogative sentence, and I comprehend that a means "has" and il/elle means "he/she", but what is the meaning of -t-, and from where it has arrived into the question? For example, the interrogative form of "Tu as douze ans." is "Quel âge as-tu ?". I don't have any problem here, but in the sentence "Elle/il a onze ans.", one can't see any -t-, which one sees in the interrogative form of the sentence.
It has no meaning. It occurs for the sound only, or as the French say, des raisons euphoniques.
Specifically, it's a species of liaison. Liaison is when the phonological environment of a syllable with no onset is created between two closely linked words, such as subject and verb. A consonant then fills the onset of that syllable.
Sometimes, that consonant is already waiting at the end of a word, normally silent yet still present in the mental grammar.
Elle dort /ɛldɔʀ/ ← In the univerted form, the second word has a consonant /d/ in the onset
Dort-elle ? /dɔʀtɛl/ ← In the inverted form, the syllable /ɛl/ "borrows" its onset from dort
Other times, there is no consonant available. Yet liaison demands one, perhaps originally because of grammatical analogy, and so a consonant is inserted from thin air.
Elle va /ɛlva/
Va-t-elle ? /vatɛl/ ← There was no silent consonant at the end of the verb
Incidentally, this also explains what takes place in uninverted forms. You probably know that sometimes you seem to pronounce the last letter of on, nous, vous, ils, and elles :
Vous venez /vuvəne/ ← The last consonant of vous is silent because venez has an onset
Vous allez /vuzale/ ← The last consonant of vous is pronounced because allez has no onset
The other way for these words to link is for one of the vowels to disappear (elision):
Je sors /jəsɔʁ/
J'aime /jɛm/ ← The schwa /ə/ at the end of je has been elided
Oddly enough, in standard written French neither solution obtained for tu :
Tu pleures /typlœʁ/
Tu aimes /tyɛm/ ← The sequence of two vowels between subject and verb is unexpected
But in informal French, at least in informal Canadian French, the vowel of tu is elided.
A complement to the very extensive answer from Luke. This "t" is the remains (or the aborted birth) of an interrogative particle ("particule interrogative").
Here is the story, around 16th century in France, people started to add the pronoun after the verb in a question:
"Ton ami peut-il venir?" which is a natural variation of "Peut-il venir?"; you just specify who is the "il" to make it clearer.
This was mostly used in spoken French, not in the written form (and you can still hear such a phrase in modern French, but mostly in dialects).
Now after some years people started to add the "t" also after other verbs (I guess, because otherwise the "i" is not very audible and because spoken language are just more flexible)
So instead of "Ton ami mange il de la viande?" (which sounds horrible) you get "Ton ami mange-t-il de la viande?"
Now spoken language being what they are, the "l" fell off (mostly when the next word began with a consonnant). So
"Ton ami peut-i venir?" or "Ton ami mange-ti de la viande?"
This interrogative particle is still present in some French dialects (I heard it in Normandy, but probably some other dialects). It is still very much alive in Canadian French (where the "i" got changed into a "u") as in
"T'as-tu de la bière?" (the first "T" is a shortened version of "Tu" and the second is the interrogative particle).
Anyways, this is the origin of the "t" in "Il y a-t-il de la bière ici?" (or in Canadian French "Y a-tu d'la bière icitte?")
See here for some details (in French).
PS: "Ton ami peut-il venir?" is much more convenient to say than "Est-ce que ton ami peut venir?"... and besides, what the hell are this "ce" and this "que" in "Est-ce que" ;o)