In this thesis, we use a phenomenological approach to the propagation of astroparticles in order to study two relevant topics in astrophysics: Lorentz invariance violation (LIV) and the origin of ultra-high energy cosmic rays (UHECR). Lorentz invariance is proposed as a fundamental symmetry of nature according to relativity. However, quantum gravity models assume or accommodate some level of LIV. We present a broad study of the potential of testing LIV with different data sets and experiments in astroparticle physics. Novel techniques are proposed for testing LIV using TeV gamma-ray and UHECR data, in special using data from Imaging Air Cherenkov Telescopes and the Pierre Auger Observatory. No signature of LIV is found and restraining limits are imposed. We present a review of the most common astrophysical tests and a compilation of the currently most restrictive limits of LIV. We also address the long-lasting question about the origin of UHECR. CR are charged particles and, thus, magnetic fields mask the information about the position of their sources. We study how the energy spectrum, composition and distribution of arrival directions can be used to retrieve information about the source distribution. Constraints on the maximum distance of the nearest UHECR source are imposed. We study the arising of a large-scale anisotropy in the form of a dipole measured by the Pierre Auger Observatory and build an understanding of the evolution with energy of the dipole strength.