The top is an actual part of the object: A box has a top, a bottom, and sides.
At the top marks a point location, like at the station-- it is a relatively small point viewed from relatively far away (in the speaker's mind).
On the top is a 2-dimensional location, like on the table-- it is a surface, viewed at a nearer distance than 'at'.
On top of is a phrasal preposition that marks a relative location:
on top of,
| b. | in addition to; over and above. |
| c. | close upon; following upon: 'Gale winds came on top of the floods'. |
| d. | in complete control: 'on top of the problem'. |