Not all uses of prepositions can be predicted by meaning. There are very few prepositions in English and they have a lot of uses, so mostly preposition uses are arbitrary and governed by particular predicates (look at, listen to, speak on, tired of, etc).
That said, however, there is a very common spatial-dimension sense for many prepositions, including in, on, and at. As Fillmore describes it in his Deixis Lectures:
The preposition at is said to ascribe no particular dimensionality to the referent of its associated noun; the preposition on is said to ascribe to the referent of its head noun the property of being a line or a surface; and the preposition in is said to ascribe to the referent of its head noun the notion of a bounded two-dimensional or three-dimensional space.
Consider phrases like at the intersection, on the line, on the page, on the wall, in the city, in the kitchen.
- at the corner, which means near or in contact with the intersection of two straight lines, or streets
- on the corner, which locates something as being in contact with part of the surface of some angular two-dimensional figure or three-dimensional object
- in the corner, in which the noun corner is used to indicate a portion of three-dimensional space -- in particular, a part of the interior of, say, a room.