Hi there!
Great question!
Basketballs have air inside them. A special pump is used to insert the air. That's why you can lift the basketballs off the ground easily. If it was a solid, though, you'd hardly be able to lift the ball up! Basketballs can float, too, because anything with air inside can float. If it were solid, it would sink in the water easily.
Hope this helps! :D