Kittens gradually wean off their mothers milk around 8-12 weeks of age. By this time they are ready to eat kitten food and are spending most of their time away from their mother.
RSPCA Australia considers the minimum acceptable age for a kitten to be removed from the mother cat for adoption or purchase to be 8 weeks of age.
Waiting until the kitten is at least 8 weeks of age will help to ensure that the kitten has received adequate amounts of milk from the mother cat. Milk contains important nutrients needed for normal kitten growth and development and confers a certain degree of immunity to disease (kittens will still need to be vaccinated, please see your local vet for details). There may be certain circumstances where kittens have to be weaned eariler than this, such as orphaned kittens requiring intensive care. In this case they are fed a milk replacement until they are old enough to eat solid food.