Both "at the top" and "on the top" are correct and can be used interchangeably in many contexts. However, "at the top" is usually used when referring to a physical location (e.g., at the top of the mountain), while "on the top" can be used more broadly (e.g., on the top of the list).