  We study conditions under which subdirect products of various types of
algebraic structures are finitely generated or finitely presented. In the case
of two factors, we prove general results for arbitrary congruence permutable
varieties, which generalise previously known results for groups, and which
apply to modules, rings, $K$-algebras and loops. For instance, if $C$ is a
fiber product of $A$ and $B$ over a common quotient $D$, and if $A$, $B$ and
$D$ are finitely presented, then $C$ is finitely generated. For subdirect
products of more than two factors we establish a general connection with
projections on pairs of factors and higher commutators. More detailed results
are provided for groups, loops, rings and $K$-algebras. In particular, let $C$
be a subdirect product of $K$-algebras $A_1,\dots,A_n$ for a Noetherian ring
$K$ such that the projection of $C$ onto any $A_i\times A_j$ has finite co-rank
in $A_i\times A_j$. Then $C$ is finitely generated (resp. finitely presented)
if and only if all $A_i$ are finitely generated (resp. finitely presented).
Finally, examples of semigroups and lattices are provided which indicate
further complications as one ventures beyond congruence permutable varieties.
