From Bulbapedia, the community-driven Pokémon encyclopedia.
Misty, Jessie, and James at the contest
The Annual Beach Beauty and Pokémon Costume Contest (Japanese: 日焼け美女とポケモンコンテスト Suntanned Beautiful Woman and Pokémon Contest) is contest held annually in Porta Vista. Each year thousands of people come to see it. In the dub, there is a $1000 prize for the winner in each category (the prize is not mentioned in the Japanese version).
In Beauty and the Beach, Professor Oak suggests using the contest to help raise enough money for Moe to pay back his debt to Brutella before her deadline of the next day.
Misty decides to enter the Beach Beauty Contest, while Brock acts as the event's MC. Ash, Professor Oak, Delia, and Moe all watch the event.
Misty is the first competitor to walk on stage; while she is embarrassed and feels degraded, she does it because they need the money. For her dressed up Pokémon, she has Squirtle (wearing a helmet with a satellite dish) sit on top of a levitating Starmie, to give the appearance of an alien on a flying saucer.
The next competitors were Team Rocket, calling themselves the Rocket Boosters; they dressed up Ekans and Koffing together with a wig to look like an Omastar, but they were kicked off stage by Gary.
Six of Gary's cheerleaders entered as the next competitors. Misty was afraid that their dramatic entrance would greatly overshadow her.
Before any further contestants could show off, Team Rocket crashed the event by driving their Gyarados submarine through the crowd. Ash got on stage to alert the audience that it wasn't a real Gyarados; Team Rocket, angered by the fact that their plan had been foiled, launched a heat-seeking missile at Ash. Ash sent out Charmander and Pidgeotto, and had Pidgeotto carry Charmander so it could use Flamethrower on the missile, causing it to turn around and lock onto Team Rocket instead. Team Rocket fled, leading the missile to Brutella's Shop.
In the dub, Ash was awarded with a trophy engraved with his name and "First Place in Our Hearts", which he left with his mother. In the Japanese version, Delia was merely holding the trophy for the real winner.