Can I ask "Does she speak foreign languages?" instead of asking "Does she speak a foreign language?" And what is the difference between the two?
Well, the main difference between the two is that your first sentence is plural and your second sentence is singular. Depending what you want to ask, both of your sentences are valid to use.
Yes, you can. Replace the word(s) "foreign language" with some languages.
Does she speak French and Spanish?
Does she speak French?
Both examples are perfectly acceptable sentences, but the first asks about multiple languages (a minimum of two).
Can you use the first question instead of the second?
Let's see what they actually mean.
"Does she speak foreign languages?" - You are inquiring if she can speak (any) foreign languages.
"Does she speak a foreign language?" - This question may fit into the following situations:
1. You hear her speak a language, which you suspect to be a foreign one.
2. You're mocking at someone, who speaks, English for example, with a heavy accent.
3. You want to know if she speaks any foreign language, for "a" can mean "any".
And what is the difference between the two?
It depends upon the situation. If you're in a foreign country and you want to know if, for instance the receptionist, speaks (any) foreign languages, then the first question would seem more appropriate, although the second is grammatically correct and might also mean the same in that context, but not the common one.
"Does she speak foreign languages?" implies that you are asking the person if "she" speaks multiple foreign languages.
If you ask, "Does she speak a foreign language?" it implies that there is only one language that you are asking about, but it doesn't necessarily mean that she doesn't speak more than one foreign language.