You're going to find that this is not as easy as you might think.
You can use a CMS (Content Management System) that has the code already developed for you, just integrate into your website.
Or you can write your own from scratch. This will require a database to store the comments. Be sure to validate your user input too!
Both ways have their pros and cons, its up to you to decide which route to go. Do a Google search for tutorials or scripts, if you want.