Can anyone tell me how to run a boss fight in cave editor?
You're going to need an NPC with an event number, with one of it's flags being "run script on death" (0x0200) at the very least. This can be pretty much any NPC, by the way, but most if not all of the official bosses in cave story have been marked with the prefix "boss" in cave editor's list of NPC's. So if you want to find them easily, sort them by name, and look for one somewhere near the top of the list.
If you want to initiate the boss, make an event with a number separate to that of the event number of the boss you have chosen. It is most common to use a vertical trigger to initiate this event. Your event is going to need this next essential command, preferably somewhere near the very end of your event
<BSL:XXXX (boss script load): this will start a boss fight with the NPC # (entity ID) that you have specified in XXXX, it will display a health bar at the bottom of the screen and all.
Now to make sure your boss can actually be finished without any hiccups, you're going to want to create an event with the same event number that you have set on your boss NPC. If you have set the boss npc's flag to 0x0200 as mentioned beforehand, your boss should run the specified event as soon as it is killed. This event in particular does not really need any essential commands, so you're a bit more free with this event. You can make it as simple as <END, or you can make an event which changes the music (like a fanfare), gives you a little victory message, or begin an entire cut scene, just don't forget to use <END.
If you don't want your boss to appear after you have defeated it for the first time, you'll need to use a <FL+:XXXX (set flag) command somewhere in your ending event (the one that is triggered when the boss dies). Give that command a number, and then give all of your boss related entities (triggers and all) a "disappears once flag ID is set" (0x4000) flag. Set the entity ID (flag id) of those entities as the same number as your <FL+:XXXX command, and you're good to go. Next time you enter the room, the boss should be all gone without a trace.
Seeing as this is your first boss, I'd suggest using Balrog or Igor. Many of the other bosses in Cave Story have pre-coded positions, making building the map around them a pain in the butt. Balrog and Igor on the other hand, are coded to be able to move much more freely around your map, making them much less of a problem in the long run.
I hope this makes sense, and as a personal tip from me, I'd suggest downloading boosters lab too. Even if you end up using cave editor more than Bl, Bl has a lot of reference materiel and tutorials all about cave story modding. They will make you a cave story genius in no time.