In general, no one can enter the property of another without committing trespass. Trespassing is an invasion of another person’s property rights. The property may be personal, such as one’s possessions or body, as well as real estate or land. In the case of real property, trespassing is stepping across the boundary of demarcation. Trespassing is usually only a personal wrong, but it can be defined as a public wrong, i.e. a crime, according to state statute and legislature.
Firefighters are allowed onto your land as "licensees." The law affords police, firefighters, surveyors, state electricity workers, and other public officers and servants a special right to enter real property in furtherance of the state’s interests. This could include crossing your land, and even causing damage to your land, to get to a burning house on your land or someone else’s land. In some jurisdictions, the government is not even required to compensate you for your damaged property because of the doctrine of "public necessity."
There are a number of affirmative defenses to trespassing. One can claim that they believed they owned the land that was trespassed on, which is a mistake of fact. Also, one can claim that they were invited onto the land or implicitly allowed onto the land. For instance, there could be a local custom of opening and closing a gate, or a well-trod path over the land.
A defendant can also make the affirmative defense of "benevolent trespassing," or trespassing in an attempt to achieve the greater good. For instance, others are justified in trespassing onto real property in order to help a person trapped under a fallen tree or to save a baby from drowning. This includes helping to put out a clearly visible fire.
However, if property owners are available, alleged trespassers are required to contact them before entering the private property if it is possible and/or reasonable to do so.
If you are involved in a legal dispute concerning trespass, you should contact a real estate attorney to understand your rights.