The Constitution Article I Section 3 Clauses 1-3

Article I Section 3 Clauses 1, 2, 3

[1] The Senate of the United State shall be composed of two Senators from each state, [chosen by the Legislature] thereof*, for six Years; and each Senator shall have one Vote.

[2] Immediately after they shall be assembled in Consequence of the first Election, they shall be divided as equally as may be into thee Classes. The Seats of the Senators of the first Class shall be vacated at the Expiration of the second Year, of the second Class at the Expiration of the fourth Years, and of the third Class at the Expiration of the sixth Year; so that one-third may be chosen every second Year; [and if Vacancies happen by Resignation, or otherwise, during the Recess of the Legislature of any State, the Executive thereof may make temporary Appointments until the next Meeting of the Legislature, which shall then fill such Vacancies],**

[3] No Person shall be a Senator who shall not have attained to the Age of thirty Years, and been nine Years a Citizen of the United States, and who shall not, when elected, be an Inhabitant of that State for which he shall be chosen.

*changed by the Seventeenth Amendment
**changed by the Seventeenth Amendment

This part lays out the basic membership of the Senate. How many there should be (two per state), that they only get one vote, how old they have to be, and residency requirements.

It also lays out a rotating election cycle so that only 1/3 of the Senate is ever up for re-election at a time. Pretty smart, as it makes sure that only 1/3 of the Senators are ignoring there Senate duties to go to fundraisers at any one time. When a state enters the union the Senators from that state actually just flip a coin to determine with of that states two Senators will be in which class. With the winner getting a slightly longer term before re-election.

If Senators leave office for any reason before there term is up the state legislature may authorize the governor of their state to appoint someone to fill the vacant seat until the next election.