A superconductor is a material that has no electrical resistance and does not allow a magnetic field to penetrate.
The electric current in a superconductor can persist indefinitely.
Superconductivity can be achieved at only very low temperatures.
For the presence of electrical resistance, the electrons in a metal must be free to move.
But when the electrons in certain metals when placed at a very low temperature, they pair up to form Cooper pairs which are very stable at low temperatures
Cooper pairs are formed by electron-phonon interactions.
An electron in the cation lattice will distort the lattice around it and create a area of greater positive charge density around itself.
Another electron situated at some distance in the lattice is attracted to this charge distortion (phonon).
The electrons thus get attracted to each other indirectly and form cooper pairs consisting of two electrons.
In case of type 1 superconductors, even at low temperatures they have small lattice vibrations, which are consistent with their high metallic conductivity, thus correlates with the weakness of the electron–phonon interactions required for Cooper pair formation.
In case of type 2 superconductors, the Cooper pairs of electrons have parallel spins, they form a triplet state, and cannot be decoupled easily by application of a magnetic field.
Since, in this case all the electrons are bound to another electron, there are no free electrons, hence electrical resistance is absent.