If you’re fixing damage that’s larger than a small nail hole, you’ll need to use a mesh drywall patch to complete the repair.
Resist the urge to attempt to fill the hole with spackle as it will crumble after it dries. Most drywall repair kits come with everything you need for wall repair, including the mesh, spackle, putty knife, and sandpaper.
Begin by placing the patch over the hole, then spread joint compound over the patch and smooth around the edges. Once dry, sand until smooth.