Shoot the ball in the direction of the arrow. (It will get shot according to its own direction.)
Sometimes the basketball can bug out after you lose. Click the flag twice if that happens.