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, they might as well have been.
Diablo IIEditDiablo II, you also had Scrolls of Identify. If you completed the Search for Cain quest, Deckard Cain would from then on identify all items in your inventory free of charge, including anything you had stashed in the Horadric Cube. If you did not complete the quest, Deckard Cain is rescued by the Rogues and will charge you for identifying your 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. You will still need to identify it if you intend to use it, of course, but some items are not particularly valuable or useful to your character, and you can simply choose to ignore that item.
Gambling was a new generation of Wirt's hidden deals. Gambled items are unidentified until you purchase them, at which point they are automatically identified when they enter your inventory. Unidentified items in the gambling window are not color-coded, so all items appear to be Magic.
As in the Diablo III Beta, items can be identified by right clicking them.
There is also a "Book of Cain" located next to the stash that can identify all unidentified items in your inventory, rather than clicking on the items individually.