We discuss a method of learning by practice based on the idea of determining classes of problems that can be solved in simplified ways. A description of a class is obtained by processes that hypothesize descriptions, generate and classify problem variations, and test the hypotheses against them. The approach has been implemented in a system that learns by practice in a domain of elementary physics. The system has two main components, a Problem Solver and a Learning Agent. The Problem Solver handles the problems in the domain and the Learning Agent does the actual learning. To perform its tasks the Learning Agent utilizes algorithms, heuristics, and domain knowledge, and for this reason it can be regarded as an expert system whose expertise resides in being able to learn by experimentation and generalization.