The Constitution provides for the Electoral College, but the states can choose the electors any way they see fit. The federal government can get involved in issues like violations of civil rights that prevent voters from exercising their right to vote.
LOC: Guide to Election Law