It is all highly mechanical with a series of linked computers around the world.
The Ministry receives the Invitation Letter in Moscow (which your agency gets if you do not have a genuine inviter) and gives it a reference number. That number will be known by the Embassy computer when you went with your application. The inviting organisation's name will be entered on your Visa. The Visa number, validity and all details are entered into the computer.
On arrival at the border point you fill in a duplicate Migration Card and hand it in. Your Passport and Visa are scanned and compared with the computer details. All being well you are given back the second half of the Migration Card with your Passport - both stamped. You need this card and photocopies of your Passport Identity page, Visa page and the specific Entry Stamp page when you apply for Registration.
Although the Registration procedure has very recently changed (within the last few weeks) you still need it. The Migration Card is no longer stamped with Registrations but they are entered into the computer. You still have to keep the Card and your Passport with you at all times until exit.
I am not convinced news of this will have yet reached the police who may demand to see Registration stamps on the Migration Card in remoter parts of the country - the guys who spent all day and night bothering tourists by doing this in Moscow's Red Square probably know by now. They are very adept at spotting non Russians. I now purposely avoid Red Square when walking in that area to spare these annoying interruptions - particularly at night.
On exit, the Passport Control again scan your Passport and Visa and the computer checks you are within your Visa and Registrations were carried out. They then stamp and keep the second part of Migration Card, stamp your Passport and let you out.
Get it wrong, expect a small fine/bribe. Do it again, expect no Visas for a year or two - or a bigger bribe!
Disconcertingly Russians do not smile as a matter of course out of politeness but only when there is something specific happy or funny to smile about - so don't be put off by stern unsmiling faces. But don't get familiar or try to be 'matey' with officials - they consider that a disrespect to their position and authority.
Enjoy - it's a great land.