There are several things which led to the massacre. In general the policy of apartheid started the massacre. The South African government was ruled by whites, mostly descended from Dutch traders. They imposed harsh, discriminatory laws against blacks in the country controlling every aspect of their lives including marriage, employment and travel. It was the latter reason the massacre came about.
The African National Congress (ANC) and the Pan Africanist Congress (PAC) were vocal groups in opposition to the laws. Each pledged support for non-violent protests against the apartheid government. Nelson Mandela was an early leader within these movements. In 1960, the ANC and PAC supported demonstrations of the pass laws requiring burdensome regulations for blacks in efforts to restrict their free movement. The protests would flood the local jails and overburden the apartheid government in attempts to reform the laws.
In Sharpeville, South Africa a large group of protesters marched on the police station. There was a tense standoff, but the police eventually began to arrest some of the protesters. However, at one point a police officer was knocked to the ground (whether intentional or accidental will never be known) and began to fire into the crowd. Other police officers joined the firing and sixty-nine people were killed. Another two hundred were estimated to be wounded.
The proximate cause was a police officer being knocked to the ground during a protest. The protest was done to demonstrate against harsh laws and serve as an intermediate cause. The ultimate cause of the massacre lies with the apartheid government and the harsh laws discriminating against blacks.