Faraday told us that an electric current generates a magnetic field and a changing magnetic field can create a current in a conductor. Maxwell refined this and we know that a changing electrostatic field generates a magnetic field and a changing magnetic field generates an electrostatic field.
If we have 2 identical ideal capacitors connected in an ideal circuit as described without any resistance and close the switch.......
The first capacitor starts to discharge and the electrostatic field in the capacitor decreases in strength creating a magnetic field. As the capacitor continues to discharge, the rate of decrease of the electrostatic field begins to decrease as well and the magnetic field begins to collapse. The collapsing magnetic field creates it's own electrostatic field which reinforces the one in the capacitor that is decreasing.
A similar but opposite magnetic field is building and collapsing in the second capacitor with the result that by the time the magnetic fields are gone, all the charge has moved to the second capacitor. The cycle then runs in reverse and we have oscillation.
At the point of the cycle where there are equal amounts of charge in each capacitor, there is energy stored in the magnetic fields equal to the energy stored in the electrostatic fields.
In the real world, energy is lost through radio wave emission due to high frequency oscillations and heat losses due to resistance. These losses cause the oscillations to decay to nothing.