This is not direct democracy. This referendum is not legally binding. In theory, the government could ignore this result. However, all major parties have stated they would follow the result.
There will be discussion about how soon to file the request to leave, though (actually, that is being discussed on the BBC right now. Problem is that the rules say that, after the request is made, a country must leave within two years. It may be smarter to make sure one can comply with that schedule before formally applying for an exit. Also, they were talking about timing the formal request w.r.t. upcoming elections in France and Germany)