You use 'to' when giving direction or reason
E.g. She is going to the market.
E.g. He did it to impress her.
You use 'in' when pertaining to location
E.g. They put the decorations in the closet.
E.g. We are studying in the library
You use 'on' when referring to an object on top of something or a date
E.g. The party will be held on December 16
E.g. The book is on the desk.