Go to the repair guides at
AutoZone.com - Get in the Zone!. You may have to use "88 Pathfinder" to get the info, but the procedure is the same. The only thing you really need to do to change the caliper is crack loose the banjo bolt attaching the line to the caliper, remove the caliper bolts (14mm), slide off the caliper assy. and remove the banjo bolt. Reverse procedure to install and use new copper washers on the banjo bolt. Bleed the brakes...and don't let the master cylinder run dry when replacing the caliper or bleeding.
Replacing the rotor is more work....The caliper mount bolts are likely either 17 or 19MM and you may need a breaker bar to get them loose. You'll have to remove the 4WD hub assy. to remove. There's a special tool for the wheel bearing lockring, but I usually make do with a pair of 90 degree needle nose pliers. Be careful not to overtighten the bearings when putting it back together. One the rotor assy is off, you'll need to unbolt and remove the hub from the rotor. Sometimes a press is helpful if there's a lot of rust.