What happens if I factory reset the phone after upgrading to Lollipop? I have updated the OS from Kitkat to Lollipop using system update. Now I want to factory reset. Does anyone know that after the factory reset Lollipop OS remains or it reverts to Kitkat?
A factory reset only clears the user data from the device, it doesn't touch the system partition which is where the update was applied.

So yes, the Lollipop upgrade remains.