Examples:
* "I saw an article about space travel in the magazine."
* "There was a coupon for a free pizza in the magazine."
"On" is used when something is placed on top of the magazine or if you're talking about the magazine being on a specific surface.
Examples:
* "I left the magazine on the coffee table."
* "The advertisement was printed on the back cover of the magazine."