A chimney should be cleaned regularly depending on how often it is used. If it is used regularly, then it should be cleaned every year. If it is only periodic, like say for a holiday event, every 3 years could be enough.
Your should have your chimney cleaned professionally, because Safety is a top priority with working off the roof to access the top of the chimney. A professional could tell you if other maintenance is needed as well. For example: brick repointing, replacement of the chimney cap, metal flue cap to prevent birds/squirrels from getting into the chimney, and/or need for metal flue liner.
A chimney that is in use needs to be cleaned periodically to prevent a chimney fire. A chimney fire is caused by firewood and debris building up in the flue over time.
Many homeowners don't think the chimney liner ever needs to be replaced. However, sometimes it must be. Some may be damaged by improperly cleaning it with a metal brush rather thatn plastic fiber brush and rods that are safer to use with a metal liner.
When selecting the wood to burn you want to stick with hardwoods that have been seasoned (dried out) rather than cheaper green wood that burns smokey.