For a repair, expect the technician to check the ignition, flame sensor, filter, blower, and venting, and to test for carbon monoxide around the furnace. On older systems they should also inspect the heat exchanger for cracks, since that is where many replace-or-repair decisions are made.
For a replacement, the contractor files the permit before work begins. Gas furnaces go through the Building Department's online system, and the issued permit is picked up at Town Hall and posted where it's visible from the street. Oil furnaces need the Fire Department's Application to Install and an inspection, with the technician present, before the Certificate of Completion is signed.
In a basement near the marsh or shore, ask the contractor whether the furnace sits below the expected flood level. Raising it on a platform, or moving it to a higher floor, may be worth pricing while the old one comes out.