A fireplace could either be the best thing you have in your home or its bane depending on how you take care of it, a wood and gas fire place each have their own procedures. Maintenance should be done in the accordance to procedure to ensure both the safety of your home and you.
When dealing with a wood fireplace, it is important to have the chimney swept regularly to clear out creosote (a dark/black colored substance) and soot which are both flammable residues the build up with time to avoid a fire a hazard. It is advisable to have a professional certify it every year to avoid a fire hazard. When the fire is out and the ashes are out you can use a soft brush and a dust pan or a vacuum cleaner if available, make sure the ash is cold before you carry this out. When lighting a fire always make certain the damper is fully opened and free from blockage to prevent the smoke from building up.
If you have a gas fireplace make sure the gas valve indicates cut off from supply before proceeding. Use a soft brush, soft cloth or vacuum to remove the cold residue from the gas logs to avoid damage. Make sure you regularly check for damage or corrosion to avoid a fire hazard or leaking gas. Ensure you thoroughly clean the internal pipes as frequently as you can to avoid internal build up, a credited professional should do a regular safety checkup.
Regardless of the kind of fireplace you have ensuring the right kind of fuel is important. When using wood hardwoods are the best option; they burn longer making them cheaper to use, generally have a hotter flame and have a lower residual effect. Always use scented gas that is easy to identify in case of a leak. Encase the area using fireproof glass to prevent heat loss and as a protective measure as well.
Always use a mask during cleaning and maintenance for health reasons and when in doubt contact a certified technician, it is better to be safe than sorry.