Nothing. You do nothing. A single lich will kill your party and eat their souls for breakfast.
It isn’t possible. As a 3rd level character, there is absolutely nothing you can do to defeat a lich, barring your DM intervening with some Deus Ex Machina.
A lich has a challenge rating of 21. Based on my napkin math using the experience guidance in the DMG, three liches is a deadly encounter for ten 20th level characters. A single lich is a deadly encounter for two 20th level characters. A CR 18 demilich, which is a lich whose soul has decayed because of malnourishment, is a deadly encounter for two 20th level characters.
Hopefully, your DM knows something you do not.
Hopefully, your DM doesn’t actually intend you to fight three liches, as it would be a total party kill in the first round. It seems quite likely that there is something else at work here. Philipp covers several conceivable possibilities in their answer.
If you aren’t having fun, talk to the DM outside of the game.
Maybe your DM really is throwing impossible encounters at your party. This doesn’t sound like fun, so if this is the case, talk to your DM about this. Being polite and respectful, just tell them, “I’m not having fun dealing with these impossible encounters. Can we get something more on our level?” And see how it goes. If your DM insists on messing with you, you may have to find a new game.
In universe, at least one of your characters should be able to determine the old man is blowing smoke.
My team and I are in a cave, trying to fight some liches that a old man asked us to kill for him
Surely you guys have heard of liches. Surely your characters would be aware that these are significantly powerful creatures. If in my game, we encountered an NPC asking is to dispose of 3 liches, we would chuckle and move on to the next quest giver. Your characters should probably know that this is impossible. You characters should know they shouldn’t even attempt this.