When we are introduced to prefixes in school, un- is one of the first we are taught, probably because the idea of negation is relatively easy to understand.
When it is prefixed to an adjective, un- almost always means "not." A fruit that is unripe hasn't become ripe yet. That goes for participial adjectives too: a dish that is unbroken is not broken; it remains intact. An unwashed car has not been touched by a sponge.
But there's a particular kind of nothingness implied in these examples by un-, and that's that nothing has been removed, taken away, or altered. The state of the thing--the fruit or the dish or the car--hasn't changed at all.
When it is prefixed to a verb, un- almost always means "do the opposite of" or "deprive of." In this case, the prefixed word does imply an altering action. You untie a shoelace that was previously tied; you unwrap a package that had been wrapped. In contrast to the aforementioned un- adjectives, here the state of the thing is being changed in some way.
With some concepts, the notion of undoing is humorously impossible. When you see something revolting or horrifying, you might exclaim, "I wish I could unsee that!"--meaning strike the vision from your memory. The song title "Un-Break My Heart" plays on this: you cannot really undo the action of breaking something, but it suggests a restoring to a previous intact state, whereas something unripe was never ripe to begin with.
Where it gets interesting is in those instances when un- means something different from "not." It's right there in the dictionary, at the second homograph entry, sense number 3: "completely."
Consider the following uses of unthaw:
A propane torch that was used to unthaw frozen pipes was blamed for a fire at a home on Gay Hill Road Monday night.
Amy Beth Preiss, Asbury Park Press (New Jersey), 21 Feb. 2006But it's easier to buy frozen puff pastry at the supermarket, in sheets and preformed shells. Just unthaw the raw dough in your refrigerator, and you're halfway on your way to making anything from simple cheese straws to baked apples to the king daddy of puff pastry creations, Beef Wellington.
The News Tribune (Tacoma, Wash.), 7 Dec. 2005
These examples use unthaw to mean "to change to an unfrozen state" or "to melt"—which is exactly what the verb thaw already means. How can unthaw mean the opposite of thaw?
To take another example, the verb unloosen:
With hands trembling with delight, Squeers unloosened the cord; and Smike, to all appearance more dead than alive, was brought into the house and securely locked up in a cellar, until such time as Mr Squeers should deem it expedient to operate upon him, in presence of the assembled school. Charles Dickens, Nicholas Nickleby, 1839
Unloosen here does not mean "make tight," which would be the opposite of loosen, but "make loose."
There's also unravel, like what happens to a sweater when you pull on a thread:
And on this trip of ours, when not otherwise engaged, he was quite as busy with his fingers as ever: unraveling old Cape Horn hose, for yarn wherewith to darn our woolen frocks…
Herman Melville, Mardi: And a Voyage Thither, 1864
The verb that forms its base, ravel, also happens to mean the same thing:
But that afternoon he raveled a thread from a tow sack, and he took a little powder from his powder-horn. He tied the powder in a piece of cloth with one end of the tow string in the powder.
Laura Ingalls Wilder, Little House on the Prairie, 1935Four wicker chairs stood side by side on her deep stern deck. Weathered and raveled and threadbare, they had carried--how long ago?--women in summer dresses and men in flannels out to see the sun go down.
John Cheever, The Wapshot Chronicle, 1954
These are three instances in which a verb beginning with un- means the same as, rather than the negative or opposite of, its stem.
And while it might seem frustratingly illogical when you are used to regarding un- strictly as a negative prefix, this use of un- isn't as irrational as it looks.
In all three cases—unthaw, unloosen, and unravel—the un- form of the verb came into being only after its stem was already established in English.
And in all three cases, notably, the verb stem already connotes some kind of undoing, an action of removing something from a state that had existed (frozenness, knottedness, intactness).
Rather than negating each action, the placement of un- in front of these verb stems seems to reinforce the undoing action of each—thereby emphasizing the idea of negation rather than serving to negate the verb stem itself.