castle (n.)
late Old English castel "village" (this sense from a biblical usage in Vulgar Latin); later "large fortified building, stronghold," in this sense from Old North French castel (Old French chastel, 12c.; Modern French château), from Latin castellum "a castle, fort, citadel, stronghold; fortified village," diminutive of castrum "fort," from Proto-Italic *kastro- "part, share;" cognate with Old Irish cather, Welsh caer "town" (and perhaps related to castrare via notion of "cut off;" see caste). In early bibles, castle was used to translate Greek kome "village."

This word also had come to Old English as ceaster and formed the -caster and -chester in place names. Spanish alcazar "castle" is from Arabic al-qasr, from Latin castrum. Castles in Spain translates 14c. French chastel en Espaigne (the imaginary castles sometimes stood in Brie, Asia, or Albania) and probably reflects the hopes of landless knights to establish themselves abroad. The statement that an (English) man's home is his castle is from 16c.
castle (v.)
move in chess, recorded under this name from 1650s, from castle (n.), as an old alternative name for the rook, one of the pieces moved. Related: Castled; castling.