When a train enters a tunnel, the air can't simply be pushed aside; it must rush backward through the narrow space between the train and the tunnel walls, filling the space behind the train. This speeding air creates a suction on the train, just like opening the window of a speeding car can suck out maps and paper. This lowers the air pressure inside the train, which can make the passengers' ears pop. How are trains and tunnels designed to reduce this effect?
One way is to try to design a completely air-tight train, like an airplane cabin. Unfortunately, this air-tight seal is often hard to maintain, especially if passengers want to walk between cars.
Another way is to design the tunnels to reduce this effect. If the tunnel's diameter is much wider than the train's, you reduce the piston-like effect that causes the backward rushing of air. Ventilation shafts can also help, although it's best if they're designed to do so. If the shafts are too large or too far apart, it can feel like the train is constantly leaving and re-entering the tunnel.
The most famous tunnel is the thirty mile "Chunnel" between England and France. Thirty miles of air is a lot to push around, so engineers have come up with a clever solution. The Chunnel is actually two separate tunnels, connected by cross passages. A Chunnel train doesn't have to squeeze all that air backward between the train and tunnel wall. Those cross passages allow the air to escape sideways--into the second tunnel--greatly improving the air pressure inside the train.