A trolley problem is a thought experiment where you are given a dilemma and you have to decide what you want to sacrifice and what you want to save.
A trolley/train will be travelling down the tracks towards a large group of people tied to the tracks. You can either choose to do nothing and let the trolley run over the people. Or you can choose to pull the lever to switch the trolley onto a different track, which only has one person tied to the track.
Variations to the trolley problem can make the decision sillier or harder.