I'm sorry; that's a little more complex than this forum can really address. This is why we refer questions like this to repair technicians on site at shops near you, or refer you to ALLDATA or Mitchell manuals to get detailed schematics and step by step instructions.
Replacing a compressor is complicated. Do you know why the compressor failed? Did it come apart internally? Is there debris in the lines? Is the orifice tube contaminated with debris? Is there refrigerant still in the system? Is the system fully charged, but the compressor will not power up? These are all questions that must be answered before describing the steps necessary to replace a compressor.
I would be remiss in suggesting a bolt on removal and installation of a compressor, including evacuate and recharge the system of refrigerant and injecting fresh compressor oil if I did not know all the facts.
Nothing - not RepairPal or anything else - can replace developing a good relationship with a local tech / shop.