Well when I did it for my ranger, I tore off the old fabric carefully because there is 1/4" of foam under it and any large gashes will show up. But I was care and had a cushy thick kind of fabric to cover up any mistakes. When the old fabric is off make sure you doo a really good job of flaking off any old, yellow foam that's there because the glue will not stick correctly if you don't.
The glue I used was in a red can and is called Super 90 which is a 3M product at lowes. Don't cheap out and get the super 77 trust me on this I had to do it twice. Then just lay the new fabric over the headliner and fold half of it back and spray both the headliner and the half of the fabric. Read the glue instructions and let it tack up in about 2 minutes then lay the fabric out, working from the inside out. Repeat for the other side and glue the edges of the fabric around to the top/behind the headliner. Let dry and install.
It's super easy and I did all in one evening if that. It turned out great but I can't get any pictures right now because I'm in Texas and my ranger is in Pennsylvania right now.