Understanding of algorithms is one of the most challenging aspects of the study of computer science. Over two decades of research has been devoted to improving techniques to learn and teach algorithms. In this work, we present a new approach for explaining algorithms that aims to overcome various pedagogical limitations of the current visualization systems. The main idea is that, at any given time, a learner is able to focus on a single problem. This problem can be explained, studied, understood, and tested before the learner moves on to study another problem. The structured hypermedia algorithm explanation (SHALEX) system is the system we designed and implemented to explain algorithms at various levels of abstraction. In this system, each abstraction is focused on a single operation from the algorithm using various media, including text and an associated visualization. The explanations are designed to help the user to understand basic properties of the operation represented by this abstraction, for example its invariants. SHALEX allows the user to traverse the graph-based algorithm model, using a top-down (from primitive operations to general operations) approach, a bottom-up approach, or a mix of these two approaches. Since the system is implemented using a client-server architecture, it can be used both through distance education and in the classroom setting. To aid and monitor the leaner, we also developed an agent in SHALEX that provides help and monitors the completion rate.