This is a difficult question because these are prepositions and it is often necessary to learn how to use them by learning examples.
The basic meanings of these three are location.
ON = on top of ex the book is on the table.
IN = inside within ex The information is in the book
AT= where ex I am at home
What makes things difficult is that they are often used for things that are not location.
ON= about My essay is on my travel in South East Asia.
IN = makes the next word an adverb In fact, I do not know.
AT = time We came at 8 o'clock.
Find a good grammar book and copy the examples on flash cards (See my notebook entry on flash cards and how to use them)
then memorize.
Hope this helps!
John