We study the partial Brauer monoid and its planar submonoid, the Motzkin monoid. We conduct a thorough investigation of the structure of both monoids, providing information on normal forms, Green's relations, regularity, ideals, idempotent generation, minimal (idempotent) generating sets, and so on. We obtain necessary and sufficient conditions under which the ideals of these monoids are idempotent-generated. We find formulae for the rank (smallest size of a generating set) of each ideal, and for the idempotent rank (smallest size of an idempotent generating set) of the idempotent-generated subsemigroup of each ideal; in particular, when an ideal is idempotent-generated, the rank and idempotent rank are equal. Along the way, we obtain a number of results of independent interest, and we demonstrate the utility of the semigroup theoretic approach by applying our results to obtain important representation theoretic results concerning the corresponding diagram algebras, the partial (or rook) Brauer algebra and Motzkin algebra.