Bonsai is a Japanese version of the original traditional art Chinese 'penjing' or 'penzai'. Unlike 'penjing', which utilizes traditional techniques to produce entire natural sceneries in small pots that mimic the grandiose and shape of real life sceneries, the Japanese 'bonsai' only attempts to produce small trees that mimic the shape of real life trees. Similar versions of the art exist in other cultures, including the miniature living landscapes of Vietnamese (Hòn non bộ). It was during the Tang dynasty, when 'penjing' was at its height, that the art was first introduced into Japan.

Purposes of bonsai are primarily contemplation for the viewer and the pleasant exercise of effort and ingenuity for the grower. By contrast with other plant cultivation practices, bonsai is not intended for production of food or for medicine. Instead, bonsai practice focuses on long-term cultivation and shaping of one or more small trees growing in a container.

The Japanese art of bonsai originated from the Chinese practice of 'penjing'. From the 6th century onward, Imperial embassy personnel and Buddhist students from Japan visited and returned from mainland China. They brought back many Chinese ideas and goods, including container plantings. Over time, these container plantings began to appear in Japanese writings and representative art.

More Info: en.wikipedia.org