Quote
Does not it close the connection if it is not well-written and mysql connection does not close?
There
can be issues with connections not being closed.
This can lead to connection "exhaustion" in the database and the whole site goes down. Either that or the database tries to handle the huge number of connections and does so, but very, very slowly.
Quote
When we click on any link, will It close the previous connection where I visited last?
You are still not grasping the idea of this Client-Server architecture.
It will close any connections
as soon as it has finishes whatever processing is required to send your browser the HTML that makes up the page as you see it.
You can have that same page sitting on your screen all day, but the web server has forgotten all about you - there is
no connection of any kind between your computer and the web server.