These lecture notes, adapted from the habilitation thesis of the author, survey in a first part various exact results obtained in the past few decades about KPZ fluctuations in one dimension, with a special focus on finite volume effects describing the relaxation to its stationary state of a finite system starting from a given initial condition. The second part is more specifically devoted to an approach allowing to express in a simple way the statistics of the current in the totally asymmetric simple exclusion process in terms of a contour integral on a compact Riemann surface, whose infinite genus limit leads to KPZ fluctuations in finite volume.