Suzanne Alejandre’s site gives a good introduction to magic squares.
Mutsumi Suzuki also provides a comprehensive set of links about magic squares.
See the related magic hexagon problem entry.
Numerous other links exist on the web.
Various code is available online for finding magic squares and other related problems:
Counting-Based Search: Branching Heuristics for Constraint Satisfaction Problems
J. Artif. Intell. Res. (JAIR), 173-210, 2012