First of all, when you say that trying to crack a pipe is hard work, what you probably mean (in physics terms) is that it takes a large force. But that doesn't necessarily mean that it requires a lot of energy. The energy used in a physical process like that is equal to the force times the distance over which the force is applied, and you don't have to push very far in order to crack a pipe. In fact, the pipe barely moves at all before it cracks, so even though the force required is quite large, it only acts over a tiny distance, and therefore it barely takes any actual energy. What little energy is required can come from the water itself.
To explain the "how" you have to consider molecular interactions. (Well you don't have to, but I'm going to.) The energy of each pair of water molecules varies with the distance between them, in a manner shown (approximately) by the following graph (from Wikipedia).
You'll notice that there is a certain distance at which the energy is a minimum. This distance represents the "natural" equilibrium distance between molecules when there is no pressure. However, when the water is under pressure, the molecules get pushed together (because pressure is roughly akin to force), so their actual distance will be a little closer than the minimum of the graph.
Water has the unique property that its "natural" density at a constant pressure reaches a maximum at a certain temperature, around 4 degrees Celsius, and that its frozen form (ice) is less dense than its liquid form. In other words, the equilibrium intermolecular distance (the minimum of the graph) is smallest at 4 degrees Celsius. If the water temperature is going to drop below 4 degrees Celsius, the minimum shifts a little to the right, which means one of two things has to happen either the water expands (if the intermolecular separation stays with the minimum of the graph), or its pressure rises (if the intermolecular separation creeps up the slope of the graph).
Now think about the situation in a pipe. As long as the pipe stays intact, the water can't really expand at all. So the only option is for the pressure to increase. As the pressure increases, the force on the pipe increases as well, and you'll notice that because the slope of the curve is very steep, the force increases very rapidly. At some point, the force becomes large enough to overwhelm the bonds that hold the atoms/molecules in the pipe together, and at that point, the pipe cracks. Notice that in this theoretical model there's no need for any part of the pipe to have moved, which means the pipe could crack without any energy being used. (In practice, there are other things going on that do make it take a tiny bit of energy.)