The method varies by game, so the first step is knowing which Pokémon title you are playing. In the Ruby and Sapphire generation, the entrance is opened by solving a small Braille puzzle on the cave wall rather than by using an item.
Tell us your version and you will get a precise route; the general rule is to read the inscription in the room and follow the instructions it spells out.