Poincare-like inequality on compact Riemannian manifolds
A more accurate concept of the inequality you are looking is a Sobolev-type inequality or more precisely Hardy's inequality. The proof of this inequality can be found in most books on weighted Sobolev inequality, say the excellent book by V. G. Maz'ya. If you just want a directly proof, say for instance the following paper
"Kinnunen, Juha; Martio, Olli, Hardy's inequalities for Sobolev functions. (English summary) Math. Res. Lett. 4 (1997), no. 4, 489–500. "
I would like to talk more about this inequality from the point view of capacity or equivalently non-linear potential. The standard proof of all (fractional) Sobolev-type inequality based on point-wise characterization of Sobolev functions, which basically reads as for a.e. $x,y$ $$|u(x)-u(y)|\leq c(n)|x-y|^{1-\alpha/p}(M_{\alpha/p}|Du|(x)+M_{\alpha/p}|Du|(y)),$$ where $M_\beta$ is the standard fractional maximal operator. In order to gain global estimates, one just integrate the above inequality and use the boundedness of the maximal operator. The equivalence of characterizations of Sobolev function can be found in the nice book of J.Heinonen, "Lectures on Analysis on Metric Spaces, Springer Verlag, Universitext 2001." or the forthcoming book of J.Heinonen et al. "Sobolev spaces on metric measure spaces, an approach based on upper gradients."
Hardy-type inequalities are usually regarded as weighted Sobolev type inequality by considering the potential term $|y-z|^{k}$ or $d(y,\partial \Omega)^k$ as a general weight. I encourage you to read the nice paper by
P.Koskela, P.Hajlasz, Isoperimetric inequalities and imbedding theorems in irregular domains. J. London Math. Soc. (2) 58 (1998), no. 2, 425–450
and
P.Koskela, P.Hajlasz, Sobolev met Poincaré. Mem. Amer. Math. Soc. 145 (2000), no. 688, x+101 pp.
The basic capacity view is to regard the right-hand side as certain capacity, and characterize the Sobolev/Hardy type inequality in terms of certain capacity. Then one could use the standard techniques from potential theory to do capacity estimates. This point of view is quite important in proving Sobolev/Hardy type inequality for irregular domains or in metric setting. As a sample, you could also read the following paper.
Koskela, Pekka; Lehrbäck, Juha, Weighted pointwise Hardy inequalities. (English summary) J. Lond. Math. Soc. (2) 79 (2009), no. 3, 757–779.
See also the homepage of J.Luhrback for the recent progress on Hardy type inequality for general domains: http://users.jyu.fi/~juhaleh/publ.html.
If you want a global inequality with a uniform constant, then you have to impose (non-negative) lower bounded on the Ricci curvature (in metric measure spaces as well). In the smooth compact Riemannian setting, the constant is of course uniform.
The same inequality holds on Riemannian manifolds, at least if you want it for small $r$. Fix a point $x\in M$ and let $r_0$ be the injectivity radius at it. If $0<r\leq\frac12r_0$, then $\exp_x:U_r\to B_r(x)$ is a diffeomorphism and bi-Lipschitz continuous with a Lipschitz constant independent of $r$. Here $B_r(x)\subset M$ is the ball in the Riemannian metric and $U_r\subset T_xM$ is the ball of radius $r$ in the tangent plane at $x$. The tangent plane is just a Euclidean space, so your original estimate holds in $U_r$, and you can apply it to $f\circ\exp_p:U_r\to\mathbb R$. Since the exponential map is a bi-Lipschitz diffeomorphism $\exp_x:U_r\to B_r(x)$, you get the same estimate (possibly with worse a constant) on $B_r(x)$. If you take $r$ very small, you can make the Lipschitz constant arbitrarily close to one and give an arbitrarily small loss of constant in the final estimate. If you have some curvature bounds (especially if the manifold is compact), the constant $c$ in the estimate can be chosen uniformly; without any such assumptions it will depend on $x$.