The Acid Worm is the mini-boss in Kraid (Area). You will most likely see this fight in 100% runs where it is required to defeat it in order to pick up two of Kraid's items. It is possible to skip the fight in Any% but you will need to perform a trick known as the Acid Worm Skip in order to cross a room without the rail system being activated.
The Acid Worm has 30 missiles worth of health.
In 100% you will typically enter Kraid (Area) with a missile capacity of 30 and pick up two more packs for a maximum total of 40 before the fight. Unless you healed at the statue before entering Kraid, you typically won't have all 40 missiles. You also need to shoot one missile block and one red door on the way to the worm, so with decent drop luck in Brinstar you should enter the fight with at least 30 missiles. More is better because you want to have around 10 missiles left when you finish the fight and collect its drops, but 30 is the minimum you need to kill it in two rounds.
When you first enter the fight you want to ride the rail with missiles selected and aiming angled down so you can fire a missile as soon as it's vulnerable. If you're fast you can fire up to three more straight into it after you've dropped on the platform, and a 5th missile angled down at it while it drops back into the acid. It's not necessary to hit all 5, but you can easily hit 3 or 4 during this time to start the fight.
Next you wait for the worm's mouth to wiggle, and you want to jump into the acid such that you'll be underneath its weak point when it latches onto the wall. Depending on your mashing speed you have time to hit about ~15-17 missiles into the worm to finish the first round. Once the worm retracts you can walljump back onto the platform. It is possible to get up in a single wall jump but extremely tight, two walljumps is safer. You also want to delay your jump back onto the platform until the worm is done retracting. If you're too fast and start walljumping immediately when the worm starts to retract, you have a high chance of triggering its enraged animation and have to wait for the acid to rise and fall before the second round starts.
The second round is the same as the first except the worm will come at you faster and you will need to walk slightly further under the platform to hit its weak spot, otherwise your missiles will tink off the worm's shell. You should have enough damage done by this point that 10-15 missiles are enough to kill it.
If you choose to kill the worm in Any% you should have 4 super missiles which do 20 missiles worth of damage. This speeds up the fight significantly and enables you to kill it in one round.
In the low% categories you don't want to take any damage because you'll be doing a lot of farming in this fight. You want every drop to be a missile drop, and taking any damage means you'll get a health drop and waste a farming round. Because you have a maximum capacity of 5 missiles, a perfect fight will take 6 rounds assuming you get all 5 missiles in to start the fight and get all 3 missile drops in all 5 rounds of farming. Due to the drop luck being as awful as it is, you can usually expect a low% fight to take 7 or 8 rounds on average.
100% HBJ Route
If you follow the HBJ route (most commonly seen in 100% Hard Mode) you will enter the worm fight with gravity suit, all beam upgrades, and lots of super missiles. There is no more strategy left other than spamming your beam on the worm to start the fight and finishing it off with super missiles.