Humans were preceded by unmanned spacecraft beginning with the Russian Luna 2 in 1959.
Then, beginning in July of 1969, a total of twelve astronauts visited the moon in six separate landings.
The robotic craft Luna 24 was the last spacecraft to soft-land on the moon's surface, in August 1976, although the Lunar Prospector orbiter was intentionally crashed in July of 1999 as an experiment to kick up some lunar dust!