Steven Halim's book Competitive Programming is the thee book for aspiring IOI contestants. Readers must have some background knowledge in basic data structures, algorithms, and programming languages and it uses both C++ and Java code to illustrate the algorithmic concepts. The first edition is now free as a PDF but we would recommend purchasing the latest 3rd Edition:
Also check out Steven's Visualgo site http://visualgo.net/ which visualising data structures and algorithms through animation. A brilliant site, which can help you understand how various data structures are built and the algoritm sequence to search them. We would encourage you to use the Training element to each section to test your knowledge of the subject.
USACO Training Pages http://ace.delos.com/usacogate provides a set of problems in increasing difficulty with solution / topic explainations for each section you complete.
Codeforces is a great web for training too but sorting by number of people that solved each problem as suggested for juniors may be boring and time-consuming. For seniors I recommend going to the Contests section http://codeforces.com/contests. Pick a random (division 2) contest there and try to solve all the problems looking at the solutions if needed.
You can also sort problems on Codeforces by the problem type:
Codeforces problemset http://codeforces.com/problemset
Other online Judges:
Of course, besides learning the theory, the competitor should practice as much as possible solving problems.
Participating in online contests is a good way to measure our progress. USACO http://www.usaco.org/ organizes a contest almost every month. Codeforces http://codeforces.com/ rounds are held once or twice per week. USACO has 3 divisions (bronze, silver and gold) while Codeforces has 2 (div 2 and div 1). Doing well in one contest will usually move the student to the next division for the next contest. TopCoder has 2 competitions per month: https://www.topcoder.com/
COCI is the Croatian Open Competition in Informatics. They hold 3 hour online competitons periodically from October to the following April to selection their team for the IOI. The competitions are held in the afternoon on a Saturday and are open to any secondary level student to participate. Each competition has 6 tasks of varying difficulty and are fantastic practice for the AIPO Finals. They also have archive of almost 10 year's worth of COCI competitons with problems, test data and solutions available. http://hsin.hr/coci/
Google Code Jam https://code.google.com/codejam
Google Call to Code https://www.calltocode.ie/
Facebook Hacker Cup https://www.facebook.com/hackercup/
Even more important than participating is the follow-up of the contest. A few days after the contest they usually publish explanations on how to solve the problems. It is highly recommended to read all the solutions to learn new ideas or algorithms and to try to solve the problems that you couldn’t solve during the contest.