A thin layer of overdense plasma is created when an electromagnetic pulse interacts with a rapidly ionizing thin foil. This layer will reflect the incoming pulse, forming a so-called plasma mirror. A simple realistic model based on paired kinetic and wave equations is used to describe analytically the process of mirror formation and the reflection and transmission of the incident pulse. The model incorporates the exact description of the ionization process in the foil and the polarization and conduction currents that follow. The analytical description of the reflected and transmitted pulses as well as their dependence on foil parameters, and initial pulse amplitude and form are presented. Possible application and effectiveness of this process to improve laser pulse contrast are discussed. In the case of the linearly polarized incident pulse, there harmonic generation occurs, that is absent in the case of the circular polarization. The spectra of the reflected pulses for different initial forms and amplitudes are studied.