The term is basically "retopology" and I'm afraid you usually do it manually.
There are some algorithms for quick&dirty retopologies for preview purposes, but those genereally tend to be targeted at organic retopology, not your issue of efficiently optimizing a mesh of any kind.
The general techniques for retopoly work on any mesh and there are plenty of tutorials around.
Typically, when retopologizing the focus is not to reduce the poly count as far as possible but to get a clean topology that can easily be subdivided without any nasty edges or artefacts while still keeping a workable polycount that is within your limits. When a mesh is supposed to be animated, the focus is on achieving a clean edgeflow that enables the mesh to bend smoothly when following the rig.
So, for most meshes, don't think too much about minimizing the face count at any cost and more about the topology itself and what topology is required for the next steps in your workflow (animating, rigging, subdividing, etc.).
If you, for whatever reason, do need to minimize the face count as far as possible without loosing the shape and the quads then I'm afraid I wouldn't know any algorithm in Blender that does that automatically.