Project Euler is a website with over 250 problems. Most of them are of a mathematical type but they are designed in such a way that you need some programming skills to solve them.
Once you’ve registered you can type your solution into a field and get a confirmation about whether it is correct. You will then get access to a forum containing source codes by other users. This is a very interesting feature since it shows how differently a problem can be approached. For example, one solution in C++ had over 20 lines while another one in K had only 1 line.
There is also a rank system depending on how many problems you have solved:
Level 1, Solved: 25-49
Level 2, Solved: 50-99
Level 5, (Expert), Solved: 200-249
Level 6, (Legend), Solved: 250+
So far, I have used Python, C++, Java and Haskell for Project Euler. And my programming skills definitely have improved since then. I learned about techniques like dynamic programming, memoization, using symmetries (for problems involving divisibility), etc. But beware, Project Euler can be addictive :D
Update (October 11, 2010):
Ben Dowling has written excellent articles with a collection of puzzle websites:
10 programming puzzle websites
10 More Puzzle Websites to Sharpen Your Programming Skills
The list goes from Topcoder, Codechef, SPOJ to puzzles for C, Ruby, Prolog and Python.
Here is another nice website with solutions: http://open-cs.net/