Many fruits that are commonly referred to as berries are not actually berries by definition, but rather one of the other types of fruit such as drupes (sometimes called stone fruit) or pomes. But avocado is not one of them.
The avocado is scientifically classified as a berry. Drupes have a very hard, stony covering around the seed (which is called an endocarp) that is often referred to as a “pit”.
Some common examples of drupes are cherries, olives, and peaches. Think of fruits that have a tooth cracking, rock-hard pit in the center, and those are drupes. Avocados are considered berries because their endocarp is softer with a smooth texture.
Avocado seeds are actually quite edible and notorious for their nutrition, and many health fanatics crush avocado seeds in a food processor in order to mix them into smoothies and other foods.
And do not mistake the avocado for a vegetable, as many people do. It is indeed a fruit and classified as a berry.