The switching rate of the order parameter in ferroelectrics has been the subject of intensive research for decades. In this paper, we present the results of experimental and theoretical study of the dynamic switching of polarization in ferroelectrics, as well as the creation of residual polarization upon action on a ferroelectric by short pulses of a high-intensity terahertz field. Sub-cycle terahertz field up to 1 MV/cm is created by optical rectification of a short optical pulse in an organic crystal. As a measure of the dielectric polarization, the intensity of second harmonic generation is recorded as a function of the delay time between THz pump and femtosecond optical probe. Epitaxial (001) and (111) oriented 500 nm (Ba0.8Sr0.2)TiO3 films were grown on MgO substrate by RF sputtering. Experiments reveal that under the action of a short powerful THz pulse on a ferroelectric, two effects are observed: modulation of the SHG intensity with exactly the shape of THz pulse and a step-like change of the SHG intensity overlapped by oscillating signal after the THz pulse ended. The former reveals transient modulation of polarization within the THz pulse duration, the latter may indicate switching of the polarization and creation of remnant polarization. Both effects take place due to the displacements of ions under the action of short THz pulses which were earlier observed in experiments on synchronous X-ray structural analysis. The observed switching behavior can be described by the nonlinear Duffing equation.