The 17th amendment, ratified in April 1913, allows the people to vote for who they want to represent them in the Senate. There are two senators elected, every 6 years, to represent each state. Prior to the passing of the 17th amendment, these positions were chosen by state legislatures.
The 17th amendment was created to help address the issue of deadlocked votes. When the state attempted to place someone as a senator, the votes in the legislature would often end up coming to a stop, due to different parties controlling different parts of the state government. This left federal level seats open and vacant for months at a time, which severely limited the ability of the national government to function.