Both, as long as your Web server is configured to serve the files as HTML documents. (To be exact, the extension doesn’t have to be either, it just has to match your Web server’ setup.)
*.htm is a vestige of MS-DOS’ limited naming convention (eight character filename plus a three character extension). Some products (notably, those from Microsoft) still default to saving pages as
*.html is the preferred extension for most Web sites serving pages in pure HTML. For the record, the
*.shtml extension found through this site denotes an HTML page generated by server-side includes.