Pokemon Sun and Moon maintain most of the qualities that people expect from Pokemon, but there are also some major changes like the removal of gyms. In place of these are what are known as Island Trials and the first one will be found on Melemele Island.
Not too far into the game you’ll come across your first island trial on the island your home is found, which is known as Melemele Island. This trial in particular takes place in Verdant Cavern, but you must first take on the Trial Captain elsewhere to be able to have access to the trial.
After completing the Trainer School in Hau’oli City, Captain Ilima will show up and tell you all about what an island trial is and challenges you to take it on. In the city, go out by the docks and you’ll find Ilima, which will cause Team Skull to show up. After defeating Team Skull, you will face off against Ilima’s Yungoos and Smeargle. Just be careful, because Smeargle can cause some problems.
Ilima will tell you exactly where to go for the Verdant Cavern on Route 2, so keep playing through the game until you get there, where you will face the first trial. Inside Verdant Cavern you cannot catch any Pokemon until the trial is over, but you will have a few Pokemon battles that will all depend on what version of the game you have. If you have Sun, you will be facing off against Yungoos and Gumshoos, while those with Moon will face Alolan Rattata and Alolan Raticate.
Your task when you enter is to go around the cavern and you’ll find each of these Pokemon pretty easily. One will take a little more work as you have to keep looking inside little caves, in which they run out and move to another. In the midst of this, you will also have to take on a few members of Team Skull, but that should be easy. After taking on the three Pokemon inside the den, you can go outside at the top and face the Totem Pokemon, which will be either a powered up Gumshoos or Alolan Raticate.
This stronger Pokemon is definitely more of a challenge than the rest, with it also being able to call on additional Yungoos or Alolan Rattata depending on the version of the game. After taking down the respective Totem Pokemon you will have completed the first Island Trial, and will be rewarded with a Z-Crystal.