Typically refers to a small, often open rail vehicle used in mines, logging, construction sites, or as a tourist attraction. The English loanword 'truck' is the source, but the Japanese meaning is narrower.
from English truck
鉱山でトロッコが石炭を運んでいる。
A trolley is carrying coal at the mine.
I rode a small sightseeing train at the tourist spot.
trolley problem
From English 'truck', but the Japanese meaning has narrowed to refer specifically to a small rail car rather than a general road vehicle.