of course, first you pull it out of the car
then pull the cloth off, behind that will be a thin layer of foam.
you'll need a styrofoam sand block people use for drywall... it makes taking the foam off of the headliner easier..
then when you get new headliner material from JoAnne's fabric or Hobby Lobby, take your SWEET time with it, start from the middle with the glue and only glue a small portion at a time.
You could run the risk of streching the fabric too tight and not following the contour of the headliner...