After you make it to the end of the cave beneath the Ghost Village, you battle Maxie the Ghost.
Location of Maxie the Ghost
Maxie the Ghost is at the end of the cave under the Ghost Village in Chapter 3.
How to Defeat Maxie the Ghost
As soon as you enter the room, use the Rod of Sight to reveal Maxie the Ghost. Then, try to use the Bolas to hit Maxie, while also dodging the fireballs from the volcanoes (the Mirror doesn't work on them), and dodging or killing the Minie ghosts that fly toward you. If you run out of Bolas, you will have to go to the left or right side of the water and try to wait until Maxie goes to that side to hit it with the Star/Yo-yo. After you have hit Maxie several times, it will start to move more quickly. Keep hitting it with Bolas (or the Star/Yo-yo if you run out of Bolas) until it disappears.
Moving On
Go through the west door, then jump on the tile. Jump on the switch and go through the north door. Jump on the north tile three times to make water pour out of the skull's mouth. After the cutscene, you will be back in the ghost village, where you can proceed to the fourth part of Chapter 3.