You have to use some programming language, usually PHP.
HTML is just for mark-up (hence the name) - it isn't a programming lanaguage.
To store the comments, you'll need a database - MySQL is the commonest one you'll find from web hosts.
Then you'll use SQL, another lanaguage, to retrieve the comments, and PHP manipulate the data returned and to display the results using PHP.