The fix and the cost depends on what's leaking. Cover gasket takes less than an hour to remove it, clean it up, apply new sealant from a tube or install a new fiber gasket, install the cover, and refill it with new lubricant. Expect around $100.00 to maybe $150.00.
Axle seals are much more involved and the cost will be for mostly labor. A seal only costs a few dollars but the cover mentioned above has to be removed, then the differential must be partially disassembled so the axle shaft can be slid out to allow removal of the seal. At that point sliding the other shaft out to replace the seal on the other side only takes a few extra minutes so most mechanics will replace both of them at the same time. The logic is if one is leaking, the other one is just as old and is likely to start leaking soon too. The last step of the job is to reinstall that cover and refill with new lubricant. I could see this job taking two or three hours on the rear axle, considerably more on the front axle if you have a four-wheel-drive truck. The second seal will take an extra ten to fifteen minutes.
A pinion seal could also be leaking. That requires removal of the drive shaft, a very large tight nut, and the "yoke" the drive shaft attaches to, to get to the seal. It takes less time than doing the axle seals and the rear cover doesn't have to come off, but they will need to add new lubricant. Tightening that nut when it's reinstalled is a very precise procedure requiring special tools to prevent a droning gear noise. This job should take around two to three hours.
The differential is a set of four gears inside the axle housing that connects the left and right axle shafts together. Their teeth are beveled at 45 degrees so they mesh and form a square similar to a picture frame. Because of those gears, when you raise the vehicle off the ground and turn one wheel forward, the other one will turn backward. Now, that entire assembly has a big gear around it and is free to rotate on a pair of really beefy bearings. To make room for that big gear, called the ring gear, is why you see the big "pumpkin" in the middle of the axle housing. That ring gear is turned by the "pinion" gear which is turned by the engine / transmission / drive shaft. When the tires are on the ground and have traction, turning that entire assembly makes both tires try to move the truck forward. When anything makes one tire want to turn faster than the other one, those four smaller gears allow that to happen. That is necessary when turning a corner, and it is what allows one tire to spin on ice or in a mud puddle while the other one won't turn. Most race cars use a different system that forces both wheels to turn all the time at the same speed. The drivers put up with that since the tires are always almost sliding across the track, but for you and me, that would be extremely irritating to drive on the road. There are additional special parts that can be built into the differential to make both wheels try to turn at the same speed. That will tend to overcome just one wheel spinning when you're stuck. GM calls that "posi-traction". Chrysler calls theirs "sure-grip". There's a few different ways of designing those systems but they all try to accomplish the same thing. Except in very rare cases you will never find those types of differentials on the front of front-wheel-drive trucks and never on front-wheel-drive cars. Trying to hold the two front wheels to the same speed would make it very hard to turn the steering wheel and hold it there.
Every car or truck will have at least one differential on the front or rear, whichever has the drive wheels. Four-wheel-drive trucks, and all-wheel-drive cars and minivans, (technically not the same thing), will have a differential on the front and on the back axles.