Stellar magnetic field is the driver of activity in stars and can trigger spots, energetic flares, coronal plasma ejections and ionized winds. These phenomena play a crucial role in understanding the internal mechanisms of the star, but can also have potential effects in orbiting planets. During the transit of a planet, spots can be occulted producing features imprinted in the transit light curve. Here, we modelled these features to characterize the physical properties of the spots (radius, intensity, and location). In addition, we monitor spots signatures on multiple transits to estimate magnetic cycles length of Kepler stars. Flares have also been observed during transits in active stars. We derive the properties of the flares and analyse their UV impact on possible living organisms in planets orbiting in the habitable zone.