When is sanding allowed after staining?

Blending two surfaces.

Re-Smoothening surfaces.

Blending surface marks.

Preparing a new coat.

Can you overstain?