Rule #1: Know where both rope ends are
Rule #2: If it's a mess now, it will be a mess later
Rule #3: Don't drop the rope!
Rule #4: Ropes like to be coiled (or stacked).
The last rule is a corollary to rule #2 (if it’s a mess now, it will be a mess later) that aims to prevent having to untangle a messy rope in the first place. For example, while out sport climbing, instead of dragging your rope from climb to climb, save yourself from grinding dirt into your rope and stack the rope on a tarp or coil it over your shoulders to carry between climbs. It’s a slightly longer investment in time initially, but if the rope were to snag on just one root or boulder as you drag it across the ground, you’ll already have saved time by being organized.
Similarly, if you’re bringing up a follower and not stacking the rope neatly as you belay, when it comes time to lead the next pitch, the belayer is likely going to have some fun trying to untangle a rope while simultaneously feeding slack to the leader. If you need to flip a rope stack over, you’re pretty much guaranteed poor results unless the rope was well-stacked from the start. When tossing the ropes for rappel, a neat stack with the rope end on top facilitates an easy toss, while a messy stack will leave you untying a knotted rope on rappel (though it will probably ensure you can’t rappel off the ends!)
The moral of the story with all of these rules is that good rope management takes a little bit of time and little bit of effort, but over the course of your climbing day can save you innumerable hiccups and annoyances.