Literally:

To become untied, unfastened, loose etc.

The rope came undone = the rope became untied
Her shirt came undone = the buttons holding her shirt became unfastened.


Figuratively: