I'm learning to play D&D and I'm following the Frozen Sick adventure from D&D Beyond. At some point, the players need to open a door with "AC 15, 18 hit points". I think AC means Armor Class, so I need to roll a D20 and get at least 15 to hit the door. But what does the "18 hit" mean?
The locked door you have cited has basically four ways you can open it. Here's the describing paragraph...
The wooden door to the cabin is locked and has AC 15, 18 hit points, and immunity to poison and psychic damage. The lock can be picked with a successful DC 12 Dexterity check using thieves’ tools, or the door can be forced open with a successful DC 15 Strength (Athletics) check. Tulgi carries the key that unlocks the door.
A character who shouts back through the door and succeeds on a DC 12 Charisma (Deception, Intimidation, or Persuasion) check convinces Tulgi to open the door and allow the party inside.
The door can be opened in these 4 ways
Hack it apart with weapons
This is what you're asking about...where it lists an Armor Class (AC) and Hit Points. Armor Class is how high you have to roll on your Attack (d20 + Modifiers). HP is how much "health" the door has, i.e. how many points of damage it can suffer before it is destroyed.
So, if the players decide to attack the door with their weapons, they must roll to Attack, needing a total of at least 15 to inflict damage on the door. When they hit it, however much damage they deal is subtracted from the door's hit points. If the door's hitpoints reach zero, it is destroyed and they can go inside. All in all, treat it just like they are attacking a creature.
I'll cover the rest of the options provided here for completeness sake...
Pick the Lock
If someone in the party has Thieves' Tools, they may make a Dexterity Skill Check (d20 + Dex Modifier, adding their Proficiency Bonus if they are proficient in Thieves' Tools). If their total is 12 or greater, they have succeeded in unlocking the door and may open it normally. If they fail, it's up to you if they can try again or not.
Force it open
Apply Boot (or shoulder) to door to try to break the lock and force the door open. A player may make a Strength Skill Check (d20 + Str Modifier, adding their Proficiency Bonus if they are proficient in Athletics). If their total is 15 or greater, they break the door open. If they fail, it's up to you if they can try again or not.
Talk your way in
The occupant of the cabin doesn't want to let people in, but can be talked into it. A player may make a Charisma Skill Check (d20 + Cha Modifier, adding their Proficiency Bonus if they are proficient in Deception, Intimidation, or Persuasion--appropriate to how they decide to try to talk their way in). If their total is a 12 or greater, Tulgi opens the door. If they fail, it's up to you if they can try again or not.
The door has 18 hit points. You'd need to do a total of 18 damage to it to break it down.
You're correct that the "AC 15" is Armor Class; note that you'd need to roll a d20 plus your attack bonus and get a 15 or higher. Usually your attack bonus will be your proficiency bonus (based on total level) plus one of your ability modifiers, such as Strength for most melee weapons, Dexterity for most ranged weapons, or a spellcasting ability if you're using a spell.
You use the handle if there is one.
This is a free object interaction assuming you are in combat and requires no rolls unless it is stuck, locked or otherwise difficult to open.
The AC is if you want to hit it with a weapon and destroy it whereas the hit points are for how much damage you need to inflict for it to be compromised enough to bypass.
There is the addition that depending on which material and size of the door is made out of it might have resistance or immunity to a given damage type and there might be a hardness which is essentially a threshold on how hard you have to hit it for it to show damage.
More details can be found in the DMG p246
DM advice. Bashing or hacking down a door in a dungeon usually draws unwanted attention with so much noise.
Also, unless there is a meaningful consequence for failure don't require rolls for things. It bogs down play.
In D&D 3.0 and beyond (not sure about older versions, but probably it was probably the case then, too), objects can be the target of regular weapon attacks just like creatures can. The base rules are exactly the same: roll the attack, compare to the target's AC; if the attack hits (ie., equals or exceeds the AC), roll damage. Some spells can target objects, some can't.
In this particular case, the door has an AC of 15. That doesn't necessarily mean you need to roll a 15 or better on the d20, though: you'll have attack modifiers. The exact modifiers will vary by edition (3.0/3.5 (and, IIRC, 4e) have a Base Attack Bonus; 5e has a Proficiency Bonus which will probably apply, depending on the weapon; both will add Strength to the attack roll for melee weapons and Dex for ranged weapons (with caveats around specific weapons/abilities/feats/...)).
The door then has 18 hit points (HP), which work just like the HP of a creature. Roll damage as usual; if you do 18 or more damage, the door's destroyed; if you do less than 18 damage, the door's been damaged but is still effectively barring your progress. Generally, you (or another creature, probably an ally) can attack it again and keep going until it's been destroyed (just like you can generally keep attacking a monster until it's dead).
In 3.0 and 3.5, objects often have Hardness, which reduces the damage from all sources (not just attacks, like Damage Reduction does). In 5e, it's likely that a door will be resistant or immune to some types of damage (eg., does a door care about psychic damage?) and may have a Damage Threshold (which allows it to ignore damage if a single attack does less damage than the threshold). In any event, those things should be called out in the specific object's description (especially for things like doors that players are apt to try to destroy if they can't open them the normal way).
It also may be worth noting that you might not need to attack the door: it may be that the door is unlocked and all you need to do to open it is to open it.