Broccoli is a member of the cabbage family, and is most closely related to the cauliflower. It is the closed flowerhead (and stems) of the species Brassica oleracea. It is used as a edible vegetable.
The tree shaped things we eat are the flowering part of the plant. The little dark green bits at the top are the undeveloped flower buds. If left on the plant they grow into little yellow flowers...