This thesis motivates and examines the use of methods from topological data analysis in detecting and analysing topological features relevant to models from sta-tistical physics and particle physics.In statistical physics, we use persistent homology as an observable of three dif-ferent variants of the two-dimensional XY model in order to identify relevant topo-logical features and study their relation to the phase transitions undergone by each model. We examine models with the classical XY action, a topological lattice action, and an action with an additional nematic term. In particular, we introduce a new way of computing the persistent homology of lattice spin model configurations and demonstrate its use in detecting topological defects called vortices. By considering the fluctuations in the output of logistic regression and k-nearest neighbours mod-els trained on persistence images, we develop a methodology to extract estimates of the critical temperature and the critical exponent of the correlation length. We put particular emphasis on finite-size scaling behaviour and producing estimates with quantifiable error. For each model we successfully identify its phase transition(s) and are able to get an accurate determination of the critical temperatures and critical exponents of the correlation length.In particle physics, we investigate the use of persistent homology as a means to detect and quantitatively describe center vortices in SU(2) lattice gauge theory in a gauge-invariant manner. The sensitivity of our method to vortices in the deconfined phase is confirmed by using twisted boundary conditions which inspires the definition of a new phase indicator for the deconfinement phase transition. We also construct a phase indicator without reference to twisted boundary conditions using a k-nearest neighbours classifier. Finite-size scaling analyses of both persistence-based indicators yield accurate estimates of the critical β and critical exponent of correlation length for the deconfinement phase transition. We also use persistent homology to study the stability of vortices under gradient flow and the classification of different vortex surface geometries.