In this note, we study different notions of curvatures of a Riemannian or a pseudo-Riemannian $n$-manifold $M$ with metric tensor $g_{ij}$. This note is intended mainly for students of physics. Hence, we will discuss only local expressions of curvatures as those are the ones we mostly use for doing physics in general relativity.
First we need to introduce the Christoffel symbols $\Gamma_{ij}^k$. The Christoffel symbols are associated with the differentiation of vector fields in a Riemannian or a pseudo Riemannian manifold $M$, called the Levi-Civita connection. The Levi-Civita connection $\nabla$ is a generalization of the covariant derivative of vector fields in the Euclidean space. Locally the Levi-civita connection is defined by $$\nabla_{\frac{\partial}{\partial x^i}}\frac{\partial}{\partial x^j}=\sum_{k}\Gamma_{ij}^k\frac{\partial}{\partial x^k}$$ and the Christoffel symbol is given by $$\Gamma_{ij}^k=\frac{1}{2}\sum_\ell g^{k\ell}\left\{\frac{\partial g_{j\ell}}{\partial x^i}+\frac{\partial g_{\ell i}}{\partial x^j}-\frac{\partial g_{ij}}{\partial x^\ell}\right\}$$ where $g^{k\ell}$ is the inverse of the metric tensor.
Locally the Riemann curvature tensor $R_{ijk}^\ell$ is given by $$R_{ijk}^\ell=\frac{\partial}{\partial x^j}\Gamma_{ik}^\ell-\frac{\partial}{\partial x^k}\Gamma_{ij}^\ell+\sum_p\left\{\Gamma_{jp}^\ell\Gamma_{ik}^p-\Gamma_{kp}^\ell\Gamma_{ij}^p\right\}$$
Locally the sectional curvature $K(X,Y)$ of $M$ with respect to the plane spanned by tangent vectors $X,Y\in T_pM$ is given by \begin{equation}\label{eq:sectcurv}K_p(X,Y)=g^{ii}R_{iji}^j\end{equation} assuming that $X,Y\in\mathrm{span}\left\{\frac{\partial}{\partial x^i},\frac{\partial}{\partial x^j}\right\}$. The sectional curvature is a generalization of the Gaußian curvature of a surface in 3-space. To see this, let $\varphi: M^2\longrightarrow M^3$ be a conformal parametric surface $M^2$ immersed in 3-space $M^3$ with metric $e^{u(x,y)}(dx^2+dy^2)$. The Gaußian curvature $K$ of $\varphi$ can be calculated using the formula (due to Karl Friedrich Gauß) $$K=\frac{\ell n-m^2}{EG-F^2}$$ where \begin{align*}E&=\langle\varphi_x,\varphi_x\rangle,\ F=\langle\varphi_x,\varphi_y\rangle,\ G=\langle\varphi_y,\varphi_y\rangle,\\\ell&=\langle\varphi_{xx},N\rangle,\ m=\langle\varphi_{xy},N\rangle,\ n=\langle\varphi_{yy},N\rangle\end{align*} Here, $\langle\ ,\ \rangle$ stands for the inner product induced by the conformal metric $e^{u(x,y)}(dx^2+dy^2)$ and $N$ is the unit normal vector field on $\varphi$. The Gaußian curvature is then obtained as the Liouville’s partial differential equation \begin{equation}\label{eq:liouville}\nabla^2 u=-2Ke^u\end{equation} On the other hand, using \eqref{eq:sectcurv} we find the sectional curvature of $\varphi$ to be $$g^{11}R_{121}^2=-\frac{e^{u(x,y)}}{2}\nabla^2u$$ which coincides with the Gaußian curvature $K$ from \eqref{eq:liouville}
Example. Let us compute the sectional curvature of the hyperbolic plane $$\mathbb{H}^2=\{(x,y)\in\mathbb{R}^2: y>0\}$$ with metric $$ds^2=\frac{dx^2+dy^2}{y^2}$$
The metric tensor is $(g_{ij})=\begin{pmatrix}\frac{1}{y^2} & 0\\0 & \frac{1}{y^2}\end{pmatrix}$. The Riemann curvature tensor $R_{121}^2$ is \begin{align*}R_{121}^2&=\frac{\partial}{\partial y}\Gamma_{11}^2-\frac{\partial}{\partial x}\Gamma_{12}^2+\sum_p\{\Gamma_{2p}^p\Gamma_{11}^p-\Gamma_{1p}^2\Gamma_{12}^p\}\\&=\frac{\partial}{\partial y}\Gamma_{11}^2-\frac{\partial}{\partial x}\Gamma_{12}^2+\Gamma_{21}^2\Gamma_{11}^1-\Gamma_{11}^2\Gamma_{12}^1+\Gamma_{22}^2\Gamma_{11}^2-\Gamma_{12}^2\Gamma_{12}^2\end{align*} We find the Christoffel symbols $$\Gamma_{11}^2=\frac{1}{y},\ \Gamma_{12}^1=-\frac{1}{y},\ \Gamma_{12}^2=0,\ \Gamma_{21}^2=0,\ \Gamma_{22}^2=-\frac{1}{y}$$ Thus we obtain $R_{121}^2=-\frac{1}{y^2}$ and hence $\mathbb{H}^2$ has the constant negative sectional curvature $$K=g^{11}R_{121}^2=y^2\left(-\frac{1}{y^2}\right)=-1$$ What is the shortest path connecting two points $(x_1,y_1)$ and $(x_2,y_2)$ in $\mathbb{H}^2$? Such shortest paths are called geodesics in differential geometry. To find out what a geodesic in $\mathbb{H}^2$ looks like, let $$J=\int_{(x_1,y_1)}^{(x_2,y_2)}ds=\int_{(x_1,y_1)}^{(x_2,y_2)}\frac{\sqrt{1+y_x^2}}{y}dx$$ where $y_x=\frac{dy}{dx}$. The shortest path would satisfy the Euler-Lagrange equation \begin{equation}\label{eq:E-L}\frac{\partial f}{\partial x}-\frac{d}{dx}\left(f-y_x\frac{\partial f}{\partial y_x}\right)=0\end{equation}with $f(y,y_x,x)=\frac{\sqrt{1+y_x^2}}{y}$. Since $f$ does not depend on $x$, $\frac{\partial f}{\partial x}=0$ and the Euler-Lagrange equation \eqref{eq:E-L} becomes $$\frac{d}{dx}\left[\frac{1}{y\sqrt{1+y_x^2}}\right]=0$$ i.e. \begin{equation}\label{eq:E-L2}\frac{1}{y\sqrt{1+y_x^2}}=C\end{equation} where $C$ is a constant. The equation \eqref{eq:E-L2} results in a separable differential equation $$\frac{dy}{dx}=\frac{\sqrt{r^2-y^2}}{y}$$ where $r^2=\frac{1}{C}$. The solution of this equation is $$(x-a)^2+y^2=r^2$$ where $a$ is a constant. Since $y>0$, the solution represents an equation of upper semi circle centered at $(a,0)$ with radius $r$, that is the shortest path (geodesic) between two points $(x_1,y_1)$ and $(x_2,y_2)$ in $\mathbb{H}^2$ is a part of an upper semicircle joining them. In particular, if $x_1=x_2$, the geodesic between $(x_1,y_1)$ and $(x_2,y_2)$ is the vertical line passing through the two points. Such a vertical line can still be considered as an upper semicircle with radius $\infty$.
Two other notions of curvatures are Ricci and scalar curvatures. The Ricci curvature tensor is given by $$\mathrm{Ric}_p\left(\frac{\partial}{\partial x^i},\frac{\partial}{\partial x^j}\right)=\sum_kR_{ikj}^k$$ We usually denote $\mathrm{Ric}_p\left(\frac{\partial}{\partial x^i},\frac{\partial}{\partial x^j}\right)$ simply by $R_{ij}$. The scalar curvature $\mathrm{Scal}(p)$ is given by $$\mathrm{Scal}(p)=\sum_{i}g^{ii}R_{ii}$$ The scalar curvature can be given, in terms of the sectional curvature, by $$\mathrm{Scal}(p)=\sum_{i\ne j}K_p\left(\frac{\partial}{\partial x^i},\frac{\partial}{\partial x^j}\right)$$ The scalar curvature is usually denoted by $R$ in general relativity.
Definition. A Riemannian or a pseudo-Riemannian manifold $(M,g)$ is said to be maximally symmetric if $(M,g)$ has constant sectional curvature $\kappa$.
Theorem. If a Riemannian or a pseudo-Riemannian manifold $(M,g)$ is maximally symmetric, then $$R_{ii}=\kappa(n-1)g_{ii}$$ where $\kappa$ is the constant sectional curvature of $(M,g)$ and $n=\dim M$.
Corollary. If $(M,g)$ has the constant sectional curvature $\kappa$, then $$\mathrm{Scal}(p)=n(n-1)\kappa$$ where $n=\dim M$.