Where Did Medieval Knights Live?

A knight was a member of the upper class. He was often not the first born so he did not receive an inheritance. He would most likely live and serve as a guard in the castle.