A PhD thesis and its applications on various aspects of the magnetosphere, including stellar wind interaction of close-in extrasolar planets, is discussed. The thesis focuses on differences arising from the close sub-stellar distances that include a low stellar wind velocity, a high stellar wind density and strong tidal interaction between the planet and the star. The thesis discusses effects due to magnetospheric interaction which include planetary radio emission, and shielding of terrestrial planets against galactic cosmic rays. The flux of galactic cosmic rays to the atmospheres of terrestrial exoplanets in close orbits around M stars are also studied. The weak magnetic field of different types of close-in terrestrial exoplanets leads to a weak protection against cosmic rays. This should be taken into account when selecting targets for the search for biosignatures in the spectra of terrestrial exoplanets.