A bergfried is like a really big tower, with thick walls that are hard to break through. It was built a really long time ago to help protect a castle or a city from enemies who might attack. The bergfried was usually the tallest building in the castle or city, so people could see really far from the top and spot any bad guys who might be coming.
People who lived in the castle or city could run up inside the bergfried and hide behind its thick walls if there was an attack. There were usually narrow stairs winding up the inside of the bergfried, and people would climb up them to get to the top.
The bergfried was a really important part of castle defense a long time ago, but nowadays, we usually use other things to protect ourselves.