How does submit.php work?

In the index.html there is this:<form id=“form-1” action=“submit.php” method=“post” id=“contact”> and the submit buttons code’s this: <a class=“button-1” href="#" onClick=“document.getElementById(‘form-1’).submit()”><span class=“txt”>Submit</span></a>. How does the data go from the form to the database. What do I need to change on WAMPserver? I am new to this.