In planetary habitability, a crucial question is whether a planet can maintain liquid water on its surface and a stable atmosphere over timescales of the order of the lifetime of a solar system. This applies both to the planets in our solar systems and to exoplanets discovered in other solar systems. Interaction between a stellar wind and a planetary atmosphere can lead to atmospheric escape. The processes behind atmospheric escape depend on stellar wind and atmospheric conditions as well as planetary magnetization. However, an intrinsic magnetic field is not necessary to protect a planet from atmospheric escape, since protective boundaries are formed also at unmagnetized planets and the magnetic field itself enables escape through the polar caps and cusps [1]. Only the planets in our solar system are accessible to in situ measurements and only under present-day contitions. To assess the evolution of planets and exoplanets we must understand the physics of planetary-stellar wind interaction, and here laboratory experiments have a role to play. Two aspects will be examined here: plasma boundaries in the planetary environment, which shield the atmospheres from the stellar wind, and the aurora, which with its optical and radio emissions enable remote sensing of the planetary environment.