Most public places are easily accessible to the public such as a public park, public Library etc.
However even though the places are public you can actually be trespassed through the court off the public property if you create a problem serious enough to warrant trespassing you.
Such as if you are unsafe to the public on that public property then you could be told not to return to the public property or be arrested.
Even a Library that is public property can ban you and trespass you from the property if you do something bad.
Also some people may not know it but even the White House where the President lives is public property but you cannot just enter that place without permission due to safety concerns for the president.
So yes you can be trespassed from public property if you do something bad enough.