Westeros is facing quite a fight with several different kinds of villains. There's the Night King and his ice dragon, of course, plus his legion of White Walkers. But another threat is the King's giant undead army that, as Jon Snow put it, "Doesn't tire, doesn't stop, doesn't feel." The re-animated corpses of humans on Game of Thrones are called wights and you can kill them much more easily than you can kill, say, a regular White Walker.
The difference between White Walkers and wights is that White Walkers were initially created by the Children of the Forest to protect them against men. The Children turned men into Walkers by stabbing them with dragonglass. Since then, other White Walkers have been created by the Night King stabbing Craster's male babies with his pointy nail. Wights, on the other hand, started as regular people. But once they died, they were re-animated by the White Walkers into mindless zombies.
The Night King has tons of wights at his disposal and he could get even more if many soldiers fall at the Battle of Winterfell. But the Stark army isn't going down without a fight. Thanks to Jon's knowledge and Gendry's weaponry skills, they're well equipped to kill as many wights as they can. And, there are a few ways to do so.
Fire
White Walkers are not susceptible to fire, but wights are. As Beric Dondarrion illustrated in the Season 8 premiere, a flaming sword was able to take the wight version of Ned Umber out.
Dragonglass
This weapon works against both White Walkers and wights and it's the primary weapon for the Stark army. Thanks to the stores of dragonglass at Daenerys' Dragonstone home, Gendry was able to form weapons for the Winterfell soldiers.
Valyrian Steel
This special metal is in short supply, but a few Winterfell occupants have Valyrian Steel swords including Jon Snow, Brienne of Tarth, Jaime Lannister, Jorah Mormont, and Arya Stark.
Killing The White Walker Who Made Them
Beric observed that killing a White Walker also kills all the wights that Walker re-animated. Without a leader, they perish. White Walkers can also be killed by dragonglass and Valyrian steel, so those weapons will come in doubly handy for the Winterfell team.
Of course, even with all of these methods of destroying the enemy, there are still too many of them. So Jon has concocted another plan. He believes that if the Night King is killed, all the wights and White Walkers will also fall — since the King created them all. He devised a plan with Bran to use Bran as bait, because the King wants to destroy the Three-Eyed Raven.
It's a brazen idea, considering that the Night King has an ice dragon and scarily good ice javelin throwing accuracy. If the Night King gets close enough to Bran for Jon to kill him, it may be too late for Bran and Jon. But someone does have to do something — and a straight fight with a field of undead soldiers probably won't work out in the Winterfell soldiers' best interest, no matter how much dragonglass they have. Hopefully their weapons will hold the wights off just long enough for Jon to execute his plan — otherwise they could all be doomed.