When you found a building burning nearby, you stopped to watch. You assumed someone else had called for help. When the police arrived, they began to question you. Suddenly, you realize that someone who saw you there believed that you were the one who started the fire.
Starting a fire with the intent of burning or charring the property maliciously is the definition of arson. This crime is typically tried as a felony, because a fire can cause serious injuries or death.
There are a number of different degrees of arson, and they are based on factors like if the building had people inside or if the person setting the fire intended to commit insurance fraud. If so, both of those crimes would be more serious than if the building was empty and burned as a result of wanting to light a fire.
Another thing to consider is the type of structure that was on fire. A local building, like a school, would lead to harsher penalties than burning down an abandoned structure, for example. Additionally, if you light a fire on your own property, you can face charges for insurance fraud if you carry fire insurance.
If you're accused of arson, it's a good idea to talk to your attorney about the specifics of the situation. You deserve to have your side of the story heard without bias before any penalties are doled out. A sentence can mean jail time and fines, so it's wise to defend yourself as well as possible to try to avoid the penalties the judge could order.
Source: FindLaw, "Arson," accessed June 16, 2017