Self-driving cars use AI algorithms to analyze sensor data (cars, pedestrians, traffic lights) and predict potential scenarios. Based on these predictions, the AI makes split-second decisions on maneuvers like braking, changing lanes, or maintaining speed.