Someone who observes an event without taking part in it is a bystander. The police may want to interview any bystanders who witnessed a robbery, to get a description of the robber.
A bystander does exactly what the word describes: they stand by, watching what's happening but not participating. You'll often hear the phrase "innocent bystander." For example, a newspaper might report on a fight breaking out after a football game, resulting in injuries to innocent bystanders. Before this word was coined around 1610, stander-by was common.