Chess engines are computer programs. They read chess positions based on a string of chess notation sent to them, brute force their way into finding the fastest way to lead to checkmate, then send you a reply saying, "Do this, as this is the best I found," before waiting for the next move. Engines differ from each other based on the algorithm they use. Those that make the best use of a computer's resources to find the best moves in the shortest amount of time become the better (and hence stronger) chess engine.