If you already maxed out your contributions for the current year, and if you really want to (for some contrived reason I can't think of), you can make HSA contributions before January 1st and count them as contributions for the next year. However, if you do so, you will be subject to a 6% excise tax.
If you accidentally make excess contributions, you should pull the funds out and file the appropriate forms with your HSA bank, then put the funds back in after Jan 1st so you can avoid the 6% fee. Note that even if you choose to leave the excess contribution and pay the tax, next year you still have to reduce the total amount you can contribute by the excess from the previous year so there is really no advantage to ever leaving excess contributions in the account.