It's a matter of training. But it's not about breathing in and enduring, it's about the art of controlling oxygen consumption and heart rate. An untrained healthy person starts to have problems after only one minute, but again, each individual is different. You can get up to 20 minutes by training. Petr Colat holds the record with a time of less than twenty minutes. But it's not swimming underwater, it's just endurance so that the body consumes as little oxygen as possible. Recently, there was also a TV record about a Czech record holder (I don't know the name) and it lasted over twenty minutes in an unregistered attempt. But it was on TV, so be careful with this information.