Polaritons formed by the coupling of light and material excitations such as plasmons, phonons, or excitons enable light-matter interactions at the nanoscale beyond what is currently possible with conventional optics. Recently, significant interest has been attracted by polaritons in van der Waals materials, which could lead to applications in sensing, integrated photonic circuits and detectors. However, novel techniques are required to control the propagation of polaritons at the nanoscale and to implement the first practical devices. Here we report the experimental realization of polariton refractive and meta-optics in the mid-infrared by exploiting the properties of low-loss phonon polaritons in isotopically pure hexagonal boron nitride (hBN), which allow it to interact with the surrounding dielectric environment comprising the low-loss phase change material, Ge$_3$Sb$_2$Te$_6$ (GST). We demonstrate waveguides which confine polaritons in a 1D geometry, and refractive optical elements such as lenses and prisms for phonon polaritons in hBN, which we characterize using scanning near field optical microscopy. Furthermore, we demonstrate metalenses, which allow for polariton wavefront engineering and sub-wavelength focusing. Our method, due to its sub-diffraction and planar nature, will enable the realization of programmable miniaturized integrated optoelectronic devices, and will lay the foundation for on-demand biosensors.