Hi,Christina. To work on an object, like homework, a problem, etc., is to "shape, form, or improve it". E.X. The little child was working on a branch with a knife to make a gun.
In this sentence, the child is tring to carve a branch into a model gun.
To work at a place, a goal, or a set of rules explains the position, purpose or the way of your work.
As a result, if I've been working on the desk for two hours, I attempt to make a desk or adorn it. On the other hand, if I've been working at the desk for two hours, I am doing sth. aside the desk.
Wish it's helpful.