Unidentified items could be equipped in their unidentified form to provide the stats of their base item. In some cases, this was actually better, as there were negative effects on some items that made identifying the items worse.
Items offered by Wirt were not technically unidentified, but considering you had to pay 50 coins before you were allowed to see them (not knowing anything, including the item type, in advance), they might as well have been.
Diablo IIEditDiablo II, magic, rare, unique, and set items all drop in their unidentified state. The player also had Scrolls of Identify, that could be (for the purpose of saving space in bags) stacked into a single Tome of Identify. If they completed the Search for Cain quest themselves, Deckard Cain would from then on identify all items in your inventory free of charge, including anything they had stashed in the Horadric Cube. If they did not complete the quest, Deckard Cain is rescued by the Rogues and will charge the player for identifying their items, just like the first game.
Unlike the first Diablo, unidentified items cannot be equipped. However, magic Items can no longer have negative effects, so there is never a risk involved by identifying them.
While unidentified items are supposed to have unknown effects, due to the fact that unique and set items are colored differently, it is sometimes possible to know what a certain item is without needing to get it identified. Because of this, the player can choose to not identify an item if they do not plan to use it. The selling price of identified item is, nearly always, covering the identification expenses.
Gambling was a new generation of Wirt's hidden deals. Gambled items are unidentified (not even their quality is known, all items appear to be magic) until the player purchases them, at which point they are automatically identified when they enter the inventory.
Diablo IIIEditIn Diablo III, items can be identified by right clicking them, or by using the Book of Cain, with a 5 second cast time. There is no need to pay any fee, or buy any reagents for that. During a brief period of the campaign, Deckard Cain can identify items for you as well (effect is exactly the same as if his book was used). Only legendary and set items need to be identified: before that, they cannot be equipped, sold, echanted, transmogrified or used for transmogrification.
Before patch 2.0., rare items were required to be identified as well. However, players complained that it was only wasting time, so this was removed from the game.