Sometimes directly speaking up against a situation might not be safe, but an indirect intervention can, like creating a distraction.
If they do not feel safe to intervene, they can tell a trusted adult, an accessible authority figure, or report to law enforcement.