The webserver typically has a pool of active connections to the database standing by ready to retrieve the site content when you visit. So when you connect to the site, it grabs a free connection from the pool and then requests the site content from the DB.
There's a bunch of stuff that can go wrong with this, most obvious being at busy times if all the DB connections in the pool are being used for other users. It might just need the maximum size of the pool made a little bigger for peak times. If the DB is running slow (meaning connections to the pool get tied up waiting for data), then the DB itself might need some performance tuning.