Scrum and Extreme Programming (XP) are definitely very aligned. In fact, if you walked in on a team doing one of these processes you might have hard time quickly deciding whether you had walked in on a Scrum team or an XP team. The differences are often quite subtle, but they are important in determining if you have the right people assigned to your team and how the project is managed.
I think there are four main differences between Scrum and XP:
These are small and often subtle differences between Scrum and XP. However, they can have a profound impact on the team. My typical advice to teams is to start with Scrum and then invent your own version of XP. The XP practices are wonderful but they work best and teams commit to them the most stridently if they discover them themselves rather than having them mandated. I help teams do this in my coaching by asking questions like, Would this bug have happened if we’d been doing test-driven development? Would we have made that mistake if we were pairing?
I find true XP to be a small target off in the distance. If a team can aim at that and hit the bull's eye, wonderful. If not, however, they are likely hacking (e.g., refactoring without any automated testing or TDD). Scrum is a big bull's eye that on its own brings big improvements simply through the additional focus and the timeboxed iterations. That's a good starting point for then adding the XP practices.
Thanks to Mike for providing this great comparison.