A normal box-shadow spreads outward from the border edge, making the element look like it floats slightly above the surface. Add inset and it's the opposite: the shadow starts at the inner edge and reads as a surface pressed inward.
The meaning of direction flips too — the offset no longer says "where the light comes from," it says "which inner edge the shadow lands on." A positive y (assuming light from above) puts the shadow on the inner bottom edge, exactly how an overhead light would darken the far side of a recessed floor.
Layering multiple shadows still works the same way as outward ones — the first one declared paints on top, so put a tight, dark layer first and a wide, soft one after for a crisp inner edge plus a gentle wash. On an element with border-radius, the inset shadow follows the same rounded corners.
When to use
For pressed buttons/toggles, or a search field that reads as a recessed groove. Keep the contrast high enough — too subtle and it stops reading as clickable (neumorphism's classic problem).