Checking the bricks and mortar around an older fireplace is important to make a dilapidated fireplace safe. If it's a gas fireplace, and the fireplace doesn't light, check the pilot light, thermocouple, voltage levels and gas valve. Repairing these items restores the fireplace to working condition.
Take any cracked brick or mortar out of the fireplace with a hammer and chisel, working gently to keep the damage from spreading to other bricks. After chipping all of the mortar out from around a damaged brick, pull the brick free gently. When all of the damaged bricks are out, brush the empty space of any remaining debris.
Spray the empty area with water to provide a surface that sticks to mortar. Mix mortar together following the manufacturer's directions, and apply it to the sides of the remaining brick. Fit the new brick into place, but wrap a string around the closer end, to allow yourself to pull it back out as needed during the leveling process.
If the fireplace is gas and doesn't light, open the vent and check the pilot light. If it has gone out, light it with a match to see if the fireplace lights. Check the attachment of the thermocouple to ensure that it is secure. Check the fittings for the gas control valve. If you don't feel comfortable working with gas, call a professional to run these tests.