A lap is defined as one length of the pool… from one side to the other.
A mile swim is 30 laps in an Olympic-size swimming pool. Each lap is 50 meters, so the total distance is 1,500 meters in a mile swim. This is shy of a true mile which is 1,609.344 meters. Similarly, a mile is 60 laps in a short course meters swimming pool.
On the other hand, a mile swim is 66 laps in a short course yards swimming pool. Each lap is 25 yards, so the total distance is 1,650 yards in a mile swim. This is again is shy of a true mile which is 1,760 yards.