Voters have elected their senators in the privacy of the voting booth since 1913. The framers of the Constitution, however, did not intend senators to be elected in this way, and included in Article I, section 3, "The Senate of the United States shall be composed of two Senators from each state, chosen by the legislature thereof for six Years; and each Senator shall have one Vote."
-www.senate.gov/artandhistory/history/common/briefing/Direct_Election_Senators.htm
State legislatures were empowered by the Constitution to choose the senators for a state. But some US states had already adopted popular "primary" elections to choose candidates before the 17th Amendment in 1913.
The Constitution allowed the state legislatures to determine how their states' Senators would be chosen. In the early days after the Constitution was ratified, legislatures often chose the Senators themselves. However, as people began to demand it, many legislatures gave the voters the right to choose their Senators even before the federal Constitution required them to do so.
Prior to the ratification of the 17th amendment U.S. senators were elected by State legislatures, thus providing a natural balance and check against unrestrained growth in the federal government. Since ratification, senators have been elected by popular vote, reducing the senate to little more than a copy of the house of representatives and removing the best check and balance against unrestrained growth and power of the federal government.
They were appointed by state legislature. In the Constitution, Article 1, section 3 states that each state gets 2 senators elected by the Legislative Brach and they run for 6 years. They each have 1 vote
They were elected by the State legislatures.
The State Legislature
State legislatures