A superconducting quantum interference device (SQUID) is the most sensitive magnetic flux sensor currently known. The SQUID can be seen as a flux to voltage converter, and it can generally be used to sense any quantity that can be transduced into a magnetic flux, such as electrical current, voltage, position, etc. The extreme sensitivity of the SQUID is utilized in many different fields of applications, including biomagnetism, materials science, metrology, astronomy and geophysics. The heart of a squid magnetometer is a tunnel junction between two superconductors called a Josephson junction. Understanding the work of these devices rests fundamentally on the BCS theory of superconductivity. In this chapter, we introduce the notion of local potential and confinement in superconductivity. We show how BCS ground state is formed from interaction of wave packets confined to these local potential wells. The starting point of the BCS theory of superconductivity is a phonon-mediated second-order term that describes scattering of electron pair at Fermi surface with momentum
k
i
,
−
k
i
and energy
2
ℏ
ω
i
to
k
j
,
−
k
j
with energy
2
ℏ
ω
j
. The transition amplitude is
M
=
−
d
2
ω
d
ω
i
−
ω
j
2
−
ω
d
2
, where d is the phonon scattering rate and
ω
d
is the Debye frequency. However, in the presence of offset
ω
i
−
ω
j
, there is also a present transition between states
k
i
,
−
k
i
and
k
j
,
−
k
i
of sizable amplitude much larger than
M
. How are we justified in neglecting this term and only retaining
M
? In this chapter, we show all this is justified if we consider phonon-mediated transition between wave packets of finite width instead of electron waves. These wave packets are in their local potentials and interact with other wave packets in the same well to form a local BCS state we also call BCS molecule. Finally, we apply the formalism of superconductivity in finite size wave packets to high Tc
in cuprates. The copper electrons in narrow d-band live as packets to minimize the repulsion energy. The phonon-mediated coupling between wave packets (of width Debye energy) is proportional to the number of k-states in a packet, which becomes large in narrow d-band (10 times s-band); hence, d-wave Tc
is larger (10 times s-wave). At increased doping, packet size increases beyond the Debye energy, and phonon-mediated coupling develops a repulsive part, destroying superconductivity at large doping levels.