In order to unlock Ninja, you must first unlock Rogue. To unlock Rogue, you must be at least level 10 on a class, then you have to go to Limsa Lominsa Lower Decks (x:8.1 y:16.1) and finish the quest 'My First Daggers'. This will allow you to change to the Rogue class. Then, once you get to level 30, you have to go back to Limsa Lominsa Lower Decks (x:8.1 y:16.1) to get the quest 'Peasants by Day, Ninjas by Night'. Completing this will give you the Soul of the Ninja, allowing you to become a Ninja.