Pattern recognition, statistics, same thing. Rather than doing out a specific math problem you have it learn by experience. If you train a net with enough different encounters, eventually it learns how to react to different situations and come out on top.