George W. Bush won the election by securing a majority of votes in the electoral college, pure and simple. The election became complicated because of the closeness of the popular vote in Florida. Florida at the time carried twenty five electoral votes, and either Bush or Albert Gore would win the election if he carried Florida. A number of Florida ballots were disputed and recounted several times. The Florida Secretary of State issued a ruling which certified Bush as the winner of the election in Florida. This decision was challenged in court by Gore, as the Secretary of State was a Republican and there was some argument that her decision was made on political considerations. The Florida Supreme Court reversed the Secretary of State's decision; however the case was appealed directly to the United States Supreme Court. The case was Bush vs. Gore. The Supreme Court in a 5-4 decision reversed the decision of the Florida court, and thereby awarded the election to Bush. Interestingly, the five justices who voted in Bush's favor were Republican and those who voted in Gore's favor were Democrats.
Many people cried foul and claimed Bush "stole" the election. Similar charges were leveled against Rutherford B. Hayes in the disputed election of 1877; in fact Hayes was often called "old Rutherfraud," and "his fraudulency." It is quite probable that if Gore had won the election, he too would have been accused of stealing it. Under any circumstances, Bush won re-election in 2004 on his own and that election was never challenged.
Since you tagged this with "Florida recount" I assume that you are asking for a legal discussion and not a discussion of what issues or campaign tactics allowed Bush to win.
Basically, the Supreme Court said that the state of Florida had to stop their recount. The Court based its ruling on the 14th Amendment. This says that all people shall get the equal protection of the laws. The Supreme Court ruled that Florida could not devise a system for a recount that would treat everyone's vote equally. I should say that they ruled that Florida could not do this in time.
Because of this, they ordered a halt to the recount. At that point, the last official count had Bush winning Florida.