The third of the thirty-nine categories of forbidden activity on Shabbat is Kotzer, or reaping fruits from the tree on which they have grown. This includes as well detaching branches or leaves from trees on Shabbat.
In order to safeguard against violations of this prohibition, the Sages issued a Gezeira (decree) forbidding making use of trees on Shabbat, fearing that one who uses a tree may mistakenly detach a fruit or branch, in violation of Shabbat. Thus, for example, it is forbidden to hang or simply place one's jacket on a branch of a tree on Shabbat, or to take one's jacket off a tree on Shabbat. Furthermore, it is forbidden to even lean against a tree or climb a tree on Shabbat. In fact, if one climbs a tree on Shabbat despite being fully aware of the prohibition, he must remain there for the rest of Shabbat; the Sages issued a penalty upon such a person, forbidding him from coming down from the tree until after Shabbat. Hence, children may not play in a tree-house on Shabbat.
This entire prohibition applies only to trees with branches and leaves. It is permissible to make use a tree stump on Shabbat, such as to sit on it or place one's foot on it to tie a shoelace.
Summary: One may not make any use of a tree on Shabbat, such as hanging or placing articles on a branch, climbing a tree or leaning against a tree. If one intentionally violates this prohibition by climbing a tree, he must remain there until after Shabbat. One may, however, make use of a tree stump on Shabbat.