In order to use the prepositions in/an correctly, you need to know what kind of word the object of the preposition is. You can practice that here.