Each vehicle must get tested every other year unless it has some kind of waiver.
For OBDI, Maryland has discontinued the roller dyno test and only does an idle test now. The idle test is much easier to pass than the old roller dyno. There is also an under-car inspection with a mirror, probably looking for a cat and confirming that your exhaust actually connects to the rear outlet where they hook up their sensor.
For OBDII, they just hook up to the OBD port and scan for issues. They may also do an under-vehicle inspection with a mirror.
There is no under-hood inspection. The techs seem to be trained to stay away from asking questions and looking for trouble -- they just do the test and let you know if you pass or fail.
If you fail, there is a waiver option under which you can bring in receipts for $450 parts and labor (or $350 parts only) showing that you tried to fix the problem but still can't pass. The waiver is good for 2 years. (Double check these amounts - they might change and my memory could be flawed).
There is also a waiver if the vehicle is registered to someone over 75 years of age and is driven, I think, less than 5,000 miles a year.
Finally, if the car is 20 years old and not used for daily transportation, it can be registered as a "Historic Vehicle." Historic vehicles are exempt from emissions testing. I recently did this for my 1991 SE-R -- it worked out well and there were no wrinkles. Just fill out the form available on line and go to the MVA. Take your old tags with you, as they will expect you to turn them in as the final step of the transaction.