The Gemara in Shavuos 21a says
מיתיבי אי זו היא שבועת שוא נשבע לשנות את הידוע לאדם שבועת שקר נשבע להחליף אימא נשבע ומחליף
What is a שבועת שוא? That is to change what is known to man. [What is a] שבועת שקר? Someone who makes an oath to change. Rather say, he makes an oath and changed.
Rashi says:
נשבע להחליף - לשנות את האמת בשבועתו היינו לשעבר כגון אכלתי ולא אכל לא אכלתי ואכל:
אימא נשבע ומחליף - נשבע לעשות ואחר כך החליף את דברו ולא עשה או שלא לעשות ועשה:
Makes and oath to change - to change the truth with his oath about the past. For example, [he says] 'I ate', but he didn't eat. 'I didn't eat' [but] he did.
Rather say makes an oath and changes - He makes an oath to do something and then changes his words and doesn't do. Or [he makes an oath] not to do [something] and he does.
The Malbim explains שוא
שגדר השוא בדיוק הוא דבר שאין בו ממש שנדע לכל שאין ממש בדבריו
The parameter of שוא exactly is something that has no substance, that it is known to all there is no substance to his words.
And he explains שקר
ששקר הוא היפך המציאות
That שקר is the opposite of the reality.
שקר would be something that has some benefit or substance to it in some facet, whether the speaker gains something by the lie, or the lie could possibly be true or is true in some facet. שוא lacks any sort of benefit or substance to it.