We present a continuous formulation of epidemic spreading on multilayer networks using a tensorial representation, extending the models of monoplex networks to this context. We derive analytical expressions for the epidemic threshold of the susceptible-infected-susceptible (SIS) and susceptible-infected-recovered dynamics, as well as upper and lower bounds for the disease prevalence in the steady state for the SIS scenario. Using the quasistationary state method, we numerically show the existence of disease localization and the emergence of two or more susceptibility peaks, which are characterized analytically and numerically through the inverse participation ratio. At variance with what is observed in single-layer networks, we show that disease localization takes place on the layers and not on the nodes of a given layer. Furthermore, when mapping the critical dynamics to an eigenvalue problem, we observe a characteristic transition in the eigenvalue spectra of the supra-contact tensor as a function of the ratio of two spreading rates: If the rate at which the disease spreads within a layer is comparable to the spreading rate across layers, the individual spectra of each layer merge with the coupling between layers. Finally, we report on an interesting phenomenon, the barrier effect; i.e., for a three-layer configuration, when the layer with the lowest eigenvalue is located at the center of the line, it can effectively act as a barrier to the disease. The formalism introduced here provides a unifying mathematical approach to disease contagion in multiplex systems, opening new possibilities for the study of spreading processes.