The elections will certainly not be fair. State television, which is where most people get their news, is only reporting about Ahmadinejad's activities; it's not reporting about the activities of others.
When it comes to the mechanics of voting, it is done by presentation of one's identity card. The interior minister has reported that there are 20 million extra identity cards floating around. He says that's due to people losing their identity cards and getting replacements, and I'm sure that's part of the explanation.