Quasi-static process: Consider a system of an ideal gas kept in a cylinder of volume V at pressure P and temperature T. When the piston attached to the cylinder moves outward the volume of the gas will change. As a result the temperature and pressure will also change because all three variables P,T and V are related by the equation of state PV = NkT. If a block of some mass is kept on the piston, it will suddenly push the piston downward. The pressure near the piston will be larger than other parts of the system. It implies that the gas is in non-equilibrium state. We cannot determine pressure, temperature or internal energy of the system until it reaches another equilibrium state. But if the piston is pushed very slowly such that at every stage it is still in equilibrium with surroundings, we can use the equation of state to calculate the internal energy, pressure or temperature. This kind of process is called quasistatic process.
A quasi-static process is an infinitely slow process in which the system changes its variables (P,V,T) so slowly such that it remains in thermal, mechanical and chemical equilibrium with its surroundings throughout. By this infinite, slow variation, the system is always almost close to equilibrium state