A general model of superconductivity mechanism based on the separation of overlapping subbands near the Fermi level in highly degenerate materials is presented. Despite some unconventional properties, high-temperature superconductors exhibit fundamental behaviors common to low-temperature superconductors. In accordance with Fermi-Dirac statistics, the Landau-Ginzburg second-order phase transition and thermodynamic relations for superconductors, the fundamental characteristics, such as the Gibbs free energy, the total system energy, the electron density of states, the energy gap, and the entropy dependences on temperature are presented. It is shown that a main error in the BCS model is the concept that any free electron passing through the lattice polarizes the lattice ions along its path, because almost all metal atoms are neutral. Below the energy gap, there are no separate electrons; free randomly moving electrons are only above the energy gap. The proposed model is applicable to both low- and high-temperature superconductors. It is shown that the main thermodynamic equations describe both the normal and superconducting phases: the free energy, the total electron energy, the energy gap, and the entropy of a highly degenerate electron gas.