Capacitor in series with transistor base

I always was under the impression that capacitors do not let current flow in a DC circuit and just charge up.

This isn't a DC circuit.

The input is a pulse, not a constant voltage.

When the rising edge of the pulse arrives, the capacitor voltage can't change instantaneously, so the transistor base voltage will follow the pulse. Then a momentary current will flow and the capacitor will charge, dropping the base voltage back toward zero over a few milliseconds. When the falling edge of the pulse arrives it will discharge the capacitor, requiring a momentary current in the opposite direction.

Assuming the duty cycle is low, the pulse rising edge will need be strong enough to bias the transistor briefly into forward operation. The falling edge will not affect the transistor, just pull the base slightly negative as it pulls current through the 5k resistor.