No pieces are allowed to be in the squares the king passes or lands on.
Castling
...
Can the king capture an enemy piece while castling?
...
http://www.fide.com/component/handbook/?id=124&view=article
"Castling is prevented temporarily:
- if the square on which the king stands, or the square which it must cross, or the square which it is to occupy, is attacked by one or more of the opponent's pieces, or
- if there is any piece between the king and the rook with which castling is to be effected."
In general the rules of castling are quite clear, there is however one certain position where I don't know if it's allowed to castle. Assume neither king nor rook have moved, the king is not in check, and passes no square that is attacked by the enemy. Can the king capture an enemy piece while castling? For example a bishop or a knight? Or is a square with an enemy piece on it considered to be 'attacked' by that piece?
Also, if there is a difference between the standard rules and chess960 rules, I'd like to hear it.