[T]he wavefunction of the electron in [a] box can penetrate into the walls. If the walls aren’t too thick, the wavefunction can actually extend right through them, so that it still has a non-zero value on the outside. What this tells you is that there is a small chance – equal to the amplitude of the wavefunction squared in that part of space – that if you make a measurement of where the electron is, you might find it within the wall, or even outside the wall.