How did United States Senators get into office before 1913?

In the 1800s, Senators were chosen by the legislatures of the various states. Article 1 Section 1 Clause 1. This was changed in 1913, by the 17th Amendment, which provided that Senators would be chosen by the people in the same way the Representatives were.