I'm trying to get a sense of how much work is needed to fix this. Is there a way to fix it just cosmetically or do I need to replace only the damaged pieces? If so, where does one get these and what other materials are needed to do the job? If I hire someone, what kind of person should it be?
Depends on what your goal is: saving money, saving time, easy repair for you to do, good enough vs. historically accurate, etc.
The trim is quite square, so replacing it will be low labor, and therefore cheaper if you have someone else do it (interior/trim carpenter). Pry it off carefully, measure new boards, cut, a few pins and a little glue, and you're ready for finishing. In the bottom picture, the trim is starting to show a gap in the mitre anyway (at the opposite end from the damage)--so if you want it to look perfect, it's worth it to pull it all off. You could also go with a different trim look if you wanted.
You could probably get away with filling all of that with wood putty or (preferably) epoxy and smoothing it out. There are a ton of guides about how to do this available on YouTube/etc.; here's one on This Old House. This is more highly-skilled work (IMHO) than simply pulling the board out and cutting a new one to match, but it is less invasive.
Another option is to round or champfer the trim in that area. This is clearly a place where wear occurs, so why make it perfect just to have it banged up again? Take a plane and match the angle of the damage. You'll still have to fill the damage on the face of the trim. Obviously this will change the aesthetic, but sometimes there is a design element from nearby woodwork that you can emulate.
(You do any of these yourself, but unless you've got skill and experience it's likely to look...like you did it yourself. Which may be fine, but if you want a perfect home, this isn't a great place to start learning as it looks like it's a public, visible spot.)
Whichever way you go, the hard step will be matching that patina. It could be quite tricky and eat up much more budget than the actual carpentry--depending on how perfect you want it. If you're planning on repainting the trim anyway, of course, this is already part of the project--but don't underestimate the effort to match what looks like an old stain.
Take a measurement and see if your local hardware store carries that size of trim. It looks like a piece of 1x2 which should be easy to find. If you can't find an exact replacement, then you'll need to rip your own, and that requires a table saw. The corners are cut with a miter saw, or you can get a miter box and handsaw.
It's easier to prime and paint trim before installing it, so all you have is a little touchup on the nail heads rather than trying to get all the corners without getting paint on the floor. If you don't already have some touchup paint, take a paint chip to the store from a piece you're replacing and they'll match the color for you.
A nail gun for finish nails makes installing the pieces quick and easy. You'll need a small air compressor for that. If this is your only project, you can hand nail and use a nail set to counter sink the nails. Fill any holes with spackle or wood putty. Apply some touchup paint, and it should look good as new.