Pits in marble are pretty rare. Pits in granite are somewhat common due to the granular composition of granite, but marble is different.
Pits or chips in marble typically only happen with blunt force trauma (hitting the surface with something pointed or dropping something on the surface). Basically, any focused impact. What can also happen with the same type of trauma is that crystals within the marble get crushed or compressed and this makes the spot of impact white or much lighter than the natural marble color.
These white spots from focal impact are called "stun marks". Unfortunately, there really isn't a good cure, but here's a couple possible solutions...
Some recommend applying a color-enhancing sealer (to darken the color of the white spots), but hard to apply it specifically to the spot only and since the marble is compacted the color-enhancer often cannot even absorb. Typically, this method doesn't change the color enough.
Another "solution" is to drill out the stun mark and then fill the hole with a color-matched epoxy. Similarly, it is very difficult to actually match the color so that the stun mark is now more invisible than it was originally. If the stun mark is not too deep, then the drilled out hole won't be either and filling the hole with a clear acrylic like this Pit & Chip Repair Kit will typically yield the most invisible repair.
Now it could be that you have both a chip or pit and a stun mark in the same location. Blunt force trauma could have crushed the crystals and chipped out some marble.
If you do have an actual pit (vs. a shallow depression), then you can fill the pit. You have the same two choices...
1. Color-matched epoxy
2. Clear acrylic
If all you did was fill the pits, then the clear acrylic will allow the color of the marble to show through. This means the pit will be filled, but it will still look whiter than the rest of the surface.
A color-matched epoxy may be better in this case if you could get a real close color match, but you almost certainly won't match the color so closely that you do not notice the repair. And epoxy is much more difficult to use than the Pit & Chip Repair Kit clear acrylic. If the spot is a shallow depression, then it can't be filled at all. Both an epoxy or acrylic need enough depth and surface area to bond to in order to make a permanent repair.
Unfortunately, stun marks don't lend themselves to an easy repair. Probably the best bet for the most invisible repair is to drill out the stun mark hoping it is shallow and then fill the hole with the clear acrylic Pit & Chip Repair Kit. The marble within the hole will be the same color (or very close) to the color of the undamaged surface and the clear acrylic allows that color to show through, which is how you get the most invisible repair.
Simply filling pits is very easy to do, however, drilling out stun marks is probably best left to a stone restoration professional. Above are some possible solutions, but it's recommended in this case to call around and have a couple stone restoration pros come in to get an in-person look and see what they think. Also, there is a chance that even with a meticulous repair it cannot be made invisible or unnoticeable.
So, a third option is to just leave the stun marks as is rather than go through the trouble and expense of a repair that may not yield great results. Or if a pit and stun mark exist on the same spot, then fill the pit so at least the surface is level and live with the white spot. This will be the easiest and most economical solution for this difficult stone care problem.