MACD subtracts a slow moving average from a fast one. When the fast line pulls away, momentum is building; when it converges, momentum is fading.
A second 'signal' line is drawn over the top. Crossings are read as momentum turning up or down, usually before the trend itself turns.
Like every chart tool it lags reality and produces false alarms in sideways markets. Treat it as a prompt to look closer, never as an instruction.