Stellar magnetic activity and variability of oscillation parameters: An investigation of 24 solar-like stars observed by Kepler