What is the difference and how is one advantageous in its particular use case?
Joysticks and mice are both capable of producing both absolute and relative inputs. Both have their advantages, and are used in situations that play to those advantages.
"Absolute" and "relative" are terms that depend on your point of view as well. For instance, Wikipedia terms "absolute" based on how the input device reports its current position to the OS. Using these definitions, a mouse and a joystick are always relative input devices, and things like touchpads or touchscreens are the only "real" absolute input devices. This ambiguity might make the following confusing, but I'll try start with a definition and use it consistently.
I'll define "relative" as "using the current state of the input as a velocity or acceleration measure" and "absolute" as "using the current state of the input directly"
- Joystick "relative" movements are used in situations where you want to use the tilt of the joystick as a velocity or acceleration measurement. For instance, if you are playing a console game that uses a third person view with a free camera, usually the right analog stick will control the velocity of the camera as it rotates around the player. Another example would be using a joystick to navigate a map.
- Joystick "absolute" movements are used when you want to use the tilt of the joystick to determine the absolute position of something. For instance, if your joystick controls peeking around a corner, how far you tilt the stick determines the absolute position of your character. Throttle/braking is typically done with an analog trigger, which is technically a joystick with fewer degrees of freedom.
- Mouse "relative" movements are used similarly to joystick relative movements. The PC ports of most console games use mouse movements in place of joystick movements for these types of relative moves, like navigating a map or choosing your direction/camera direction.
- Mouse "absolute" movements are a bit less common, simply because it's tough to determine where exactly a mouse is on a surface. However, you can provide a mouse with a constant acceleration for a short period, and I've seen this used in things like early flight sims to "look around the cockpit" or similar. As long as you're moving the mouse to the right, you look to the right, and then when you stop, you snap back to the center.
Since mouse "absolute" movements are tricky and error prone, often times you'll see these types of inputs mapped to digital controls like the keyboard. This type of thing is common with accelerator/brake pedals in driving games, for instance. The expectation is that you'll manually employ something like pulse width modulation (ie, tapping the button to go "not too fast and not too slow") to emulate the performance of the stick.
It may be helpful if you explain where you came across these terms, as context could be important. But briefly:
In absolute input, say for a joystick, the report from the controller is based on what you're doing to it. For example, the X-Y bearing of the joystick (say it's entirely pulled back) or the throttle stick being half-forward.
A mouse doesn't have a base position that it can track, so in relative input, the system works on differential changes. So the difference between the current position of the mouse and where you move it to in a certain time period.
Neither really has an advantage over the other, it's just a symptom of the input method. Theoretically you could have relative joystick input, but you couldn't have absolute mouse input.