You have to remove all the trim that holds up the headliner. Then remove the cardboard that the liner attaches to. Then removed the old cloth and foam backing. You can get new foam, cloth and spray-on adhesive at a commercial fabric dealer or some auto interior suppliers.
Spray the cardboard backing, apply the foam, spray the foam and apply the cloth. Once it dries you can cut the foam and cloth to fit. Re-install.
Pretty simple really and only takes a couple of hours.
_________________________
Mike
Buda/Port Aransas, TX