This is a fairly broad question, because there are so many different types and brands available. I would suggest picking up some How To books, like the "for dummies" series.
Measure twice, cut once as the old saying goes. Allow about 2-3 inches on each side to reinforce the corners. Consider heating the metal before securing for more pliability.
Clear away any obstuctions within the chmney. Choose the chimney liner for your chimney. Install the chimey liner from above. Screw plates on the bottom on the chimney loner to hold it in place.
Lining your chimney is necessary, especially when your chimney is old, and the lining is no longer intact. there are cheaper alternatives to rebuilding your chimney to fix the problem:
Clear things away in chimney. measure two times about 2-3inches on each side to reinforce the corners. Install chimney line from above, screw plates on/bottom for chimney loner to hold.