What makes a webpage's sound continue after the page is closed?
As you may see, websites that keep the music running appear as the music app (here on iOS 6) 



It uses the HTML5 audio feature. In the website you gave (coffitivity.com). They use the JPlayer plugin for jquery to use the HTML5 audio API.