Technically, it's both.
A vegetable is defined as being the edible portion of a plant,
which could be leaves (like lettuce or spinach), roots (like
potatoes or radishes), seeds (like sunflower or pumpkin
seeds), or the part of the plant that contains the seed
producing ovaries of the plant.
But, a fruit is specifically defined as being the edible part of
a plant that contains the seed producing ovaries. By that
definition, things that we normally think of as being
vegetables (like cucumbers, squashes, tomatoes, and even
peppers) are actually the fruits of their respective plants.