From the article "Harry Potter Filming Locations in Britain" on <PERSON> site: (for those of you that might not know, <PERSON> is an American author and television personality focusing on European travel- he had a long running travel show on PBS).
Locations in Oxford:
Hogwarts, <PERSON>’s prestigious wizarding prep school, is a composite of several locations, many of them real places in Oxford.
Christ Church College inspired two film sets familiar to <PERSON> fans. In The Sorcerer’s Stone, the kids are ferried to Hogwarts and then ascend a stone staircase that leads into the Great Hall. Christ Church’s high-ceilinged dining hall was a model for the one seen throughout the films (with the weightless candles and flaming braziers).
Christ Church College's dining hall
Hogwarts' Dining Hall:
Christ Church College, inspiration for the Great Hall:
.
Later in The Sorcerer’s Stone, <PERSON> sneaks into the restricted book section of Hogwarts Library under a cloak of invisibility. This scene was filmed inside Oxford’s Duke Humfrey’s Library. <PERSON> reads about the Sorcerer’s Stone here, too.
.
At the end of The Sorcerer’s Stone, <PERSON> awakens in the Hogwarts infirmary, filmed in the big-windowed Divinity School, on the ground floor of the Bodleian Library; <PERSON> also recuperates here after being poisoned in The Half-Blood Prince. 570
In The Goblet of Fire (2005), <PERSON> turns <PERSON> into a ferret in the New College cloister.
.
.
Locations in Durham and Northeast England
In The Sorcerer’s Stone, <PERSON> walks with his white owl, <PERSON>, through a snowy cloister courtyard located in Durham’s Cathedral.
<PERSON> first learns to fly a broomstick on the green grass of Hogwarts’ school grounds, filmed inside the walls of Alnwick Castle, located 30 miles from Newcastle. In The Chamber of Secrets, this is where the <PERSON>’ flying car crashes into the Whomping Willow.
.
Locations in Scotland
Also in The Prisoner of Azkaban, Hogwarts Lake was filmed using Loch Shiel, Loch Eilt, and Loch Morar near Fort William, and <PERSON> skips stones across the water at Loch Eilt. Steal Falls, a waterfall at the base of Ben Nevis, is the locale for <PERSON>’s battle with a dragon for the Triwizard Tournament in The Goblet of Fire.
.
.
Locations in and around Bath
Many scenes showing the mysterious side of Hogwarts were filmed in the elaborate, fan-vaulted corridors of the Gloucester Cathedral cloisters, 50 miles north of Bath. In The Sorcerer’s Stone, when <PERSON> and <PERSON> set out to save <PERSON>, they look down a long, dark Gloucester hallway and spot a 20-foot troll at the far end.
.
In The Sorcerer’s Stone, the scene showing <PERSON> being chosen for <PERSON>’s Quidditch team was shot in the halls of the 13th-century Lacock Abbey,13 miles east of Bath. <PERSON> attends Professor <PERSON>’s class in one of the Abbey’s peeling-plaster rooms — appropriate to <PERSON>’s temperament. (You can visit with recommended Mad Max Tours.)
.
Outdoor scenes from the first Deathly Hallows, in which <PERSON>, <PERSON>, and <PERSON> take refuge in the woods, were filmed in the Swinley Forest area of Windsor’s Great Park.
Also, from wikipedia:
* Alnwick Castle, Northumberland (Hogwarts exterior)
* Bodleian Library, Oxford (Hogwarts interiors)
* Christ Church, Oxford (Hogwarts interiors)
* Durham Cathedral (Hogwarts interiors)
* Gloucester Cathedral (Hogwarts corridors)
* Harrow School, (Professor <PERSON>'s classroom)
* Lacock Abbey, Wiltshire (Hogwarts interiors)
* New College, Oxford (Hogwarts cloisters)
* St Paul's Cathedral, London (Spiral staircase in Hogwarts) 570