George Washington was the first U.S. president. He was unanimously elected to the office in 1788 and again in 1792. Each state that was a member of the union (in other words, each state that had adopted the then new U.S. Constitution) selected electors to the Electoral College. This body had the duty of choosing the president by vote of its members.
At that time, electors were chosen by popular vote only in some of the states. Virginia, Delaware, Maryland and Pennsylvania left the choice entirely up to the voters. New Hampshire had a mixed system. The other five of the ten states which had adopted the U.S. Constitution chose electors by a vote of the state legislatures. Even states that selected electors by popular vote limited that vote to white males who owned property.
George Washington was the unanimous choice because most of the people in positions of power trusted him. The common people trusted him, too. He had been the Commander in Chief of the Continental Army in the American Revolutionary War, and he had presided at the Constitutional Convention in 1787 that wrote the U.S. Constitution. He distrusted organized political parties and warned against their dangers when he retired, voluntarily, after his second term of office.