“A government of the people, by the people, for the people”
"Of the people" refers to the government's composition. It's referring to the fact that the government is made up of people who come from the people.
"By the people" refers to who chooses those people who make up the government.
Essentially, it's saying that it's a government comprised of common people who were chosen by common people.
Of the people refers to the government's target, indicating what is governed.
Of the people is not really necessary, but emphasizes the rest of the sentence.
[B]y the people indicates that government was designated by the people. It refers to democracy.
[F]or the people indicates that the objective of the government is to improve common welfare.