Flowering plants make new seeds inside the flower using male and female parts. Some plants, such as a holly tree, may have either male or female flowers. If a tree has male flowers it will never produce any berries: they are only produced on trees with female flowers.
Not all green plants produce flowers. Mosses, ferns and conifers do not produce flowers. The plants that have flowers belong to a group called the flowering plants.