As the name suggests, it is a parody of the Magic 8-Ball produced by Mattel. It has no other purpose in the series other than being the object that Cosmo and Wanda sprang from after Timmy broke it in frustration.
The Magic 9-Ball is a yellow billiard ball with the number nine on it. It has a hole which displays a message after the ball is shaken.
In the pilot, Timmy asks it when his mom and dad will return home from the movies, but it answers "Titanic: Director's Cut", affirming to him that they won't be back for a while. Upset with this answer, Timmy throws the 9-Ball at his wall, and it breaks open to release Cosmo and Wanda, who had apparently been hiding in it at the time. This scene is recreated in the movie Abra-Catastrophe! Also, in the movie "Fairy Idol", Chester receives Norm The Genie as a fairy godparent and he arrives in a magic 9-ball.
The Magic 9-Ball also appears in Nicktoons: Battle for Volcano Island as one of Timmy's missing items that the player can find in order to unlock his minigame. It can be found in Calamity Cove.