Article Two of the United States Constitution
Each state has two United States Senators and a certain number of United States Representatives representing them in Congress.  (The number of Representatives depends on how many people live in the state.)  Each state gets a number of Electors that is equal to the number of Members of Congress the state has.  (For example, if a state has 2 Senators and 10 Representatives, they have 12 total Members of Congress, so they get 12 Electors.)