A word doesn’t necessarily belong to a particular part of speech. Depending on how it is used in a sentence, it can belong to more than one. In is no exception: It can function as preposition, adjective, adverb, or noun (occasionally).
1. In as preposition
As preposition, it covers range of meanings: inside a container, place, or area; into something; during a period of time; inclusion within a group or category; wearing or covered by something; and more. Like all prepositions, it is followed by a noun phrase. Examples:
The meeting is in the first conference room.
Charles Darwin was born in 1809.
I work in sales department.
The children were in their school uniforms.
2. In as adjective
It is used as an adjective when describing a noun as popular or fashionable. It is mostly used attributively, implying it comes immediately before the noun it is modifying.
Long hair was the in thing in 80s.
Maldives is the in destination for vacation.
The new Italian restaurant is the in dining place in the town.
3. In as adverb
As an adverb, in shows movement towards something, that someone is at home or work, that the ball is within the area of play, and more.
The cheetah was closing in on the antelope.
Mac isn’t in yet.
The chair umpire called the ball in.
She has been voted in as the mayor with a thumping majority.
4. In as noun
It can be used as noun in idioms have an in with somebody and the ins and outs of something:
I’m still learning ins and outs of the new job.
It helps to have an in to get a break in showbiz industry.