The toy is old. The name is much younger, and nobody can say exactly where it comes from.
Wikipedia says the toy is documented since about 440 BC, and the Straight Dope cites a Greek bowl of around 450 to 500 BC showing a boy with a disk on a string. Claims of a Chinese toy around 1000 BC, or of 16th-century Philippine hunters with a disk-and-twine weapon, lack hard evidence, the Straight Dope says.
The name points to the Philippines. Etymonline dates "yo-yo" to 1915 and says it is "apparently from a language of the Philippines," without naming one. Wikipedia says it probably comes from the Ilocano word yóyo or a cognate.
You will often read that it is Tagalog for "come back." The Straight Dope traces that to a 1916 Scientific American Supplement article on Filipino toys. No dictionary I checked confirms the meaning, so treat it as a claim and not a fact.
Before the name, English had bandalore, which Etymonline records in 1802 for the same toy. The "yo-yo" name caught on after the toy was marketed in America.
Pedro Flores, a Filipino immigrant, began producing yo-yos in California in 1928, the Straight Dope says, and he started spinning contests in 1929. He never claimed to have invented the toy, saying it had been a game in the Philippines for centuries.
Donald F. Duncan bought the Flores company, rights and trademark, in 1932 according to the Straight Dope, for what it gives as a quarter of a million dollars. Wikipedia places the purchase around 1929 and the transfer of the Flores name in 1932. Etymonline says the trademark was registered in Vancouver, Canada, in 1932.
The Straight Dope says the trademark forced rivals to sell "whirl-a-gigs" and "twirlers." It also says a court ruled in 1965 that "yo-yo" had become common speech, so the word is now free for anyone to use.