  This thesis focuses mainly on understanding the origin of the
Bekenstein-Hawking entropy for a class of four- and five-dimensional BPS black
holes in string/M-theory. To this aim, important ingredients are holography and
supersymmetric localization. Using the method of supersymmetric localization,
the Euclidean path integrals for supersymmetric field theories on
$\Sigma_\mathfrak{g} \times T^{n}$ $(n=1,2)$, with at least four real
supercharges, can be reduced to a matrix integral that depends on background
magnetic fluxes and chemical potentials for the global symmetries of the
theory. This defines the topologically twisted index which, upon extremization
with respect to the chemical potentials, is conjectured to reproduce the
entropy of magnetically charged static BPS AdS$_{4/5}$ black holes/strings. We
solve a number of such matrix models both in three and four dimensions and
provide general formulae in the large $N$ limit. We then use these results to
provide the microscopic realization of the entropy of a class of BPS black
holes in $\mathcal{N}=2$ gauged supergravity. Finally, inspired by our previous
results, we put forward an extremization principle for reproducing the
Bekenstein-Hawking entropy of a class of BPS electrically charged rotating
black holes in AdS$_5\times S^5$.
