ELI5: Imagine a ring on a table. They putting some marbles in that ring. They can roll anywhere, right? Well, quantum mechanics makes you put those marbles in a neat little grid. The marble can still ‘roll’ like a piece moves on a chess board: to unoccupied spots around it. If there’s something already in it, though, it won’t be able to move there. Each of those spots is a ‘quantum state.’
(Importantly, the ring on the table typically represents spots in phase space—something that involves both position and momentum—rather than real space)
ELI15: A quantum state is a state that a quantum system can be in. That isn’t very helpful, but you are asking about something very fundamental and thus something very difficult to describe without getting into the math.
It is important to note that a ‘state’ means very little without knowing what ‘system’ it describes. A system is made up of all the interacting particles that pull on each other and is what we are interested in describing.
All of these interactions collectively generate the ‘potential’ at every point in space and time, and knowing this potential allows us to write down the specific Schrödinger equation that we want to solve. This equation will have a limited^1^ number of solutions.
Consider your computer science class-instance again. Each instance of the class represents a state, but there is a larger class called System that has an array-type property that holds the States that solve it. Additionally, you should add another property to the State class: occupation. For bosons, this property is an Int, but for fermions, it is a Bool.^2^ Now, in order for a boson to join the system, it needs to increment the occupation counter on one of the States, but for a fermion to join, it needs to find a State with a False occupation and flip it to True.
Allowing for multiple fermions in the same state would result in a loss of information; nothing changes if a True state is flipped to True. This is thus not allowed, forming the basis of the Pauli exclusion principle.
ELI25: A quantum state is a linear combination of eigenstates for an observable quantum operator—typically the Hamiltonian of a system. Saying that the PEP disallows fermions from entering the same quantum state is a crude way of saying that their combined wavefunction must be antisymmetric:
Ψ(𝛙~1~, 𝛙~2~) = -Ψ(𝛙~2~, 𝛙~1~)
But then if
𝛙~1~ = 𝛙~2~
We get
Ψ(𝛙~1~, 𝛙~2~) = -Ψ(𝛙~1~, 𝛙~2~)
Which means
Ψ = 0
And is thus disallowed
^1^ limited means ‘quantized’ here—not ‘finite’
^2^ notably, you get a different system and thus a different set of States for every particle type. So a clump of neutrons would be unable to ‘exclude’ an electron