What year did castle first built?

The first castle in Europe was the Motte and bailey castle. It was first built in Normandy, France. It was built in 1051.

I hope that I answered your question