Gastly evolves into Haunter at level 25. To get Gengar, you'll then need to trade Haunter to another Pokémon game — that trade is what triggers the final evolution.