Play is an important stage of development for most young mammals. It is when they learn and develop skills they will need as an adult. As they grow to adulthood they largely (but not entirely) outgrow their playfulness.
It's nature; they are Cats-in-training, and the attacking and playfulness is practice for hunting. It's really important for their mental and physical well being for cats and kittens to play so make sure you encourage this in an appropriate way. It can be hard, but don't play with a kitten in any way you wouldn't want to play with an adult cat-with sharp claws and STRONG legs and jaws! This means not using your hand as the "toy" and not allowing furniture scratching. ...but have fun. :)