Spam topic is not when a topic has no replies. There are topics that people may reply to late. Spam topic is an unwanted topic. If you stay active on this forum, you will start to notice them. Such topic will have zero value.
Also the person that created the topic may post the topic again and again, or be posting another topic which have no useful content but to just spam.
A spam may not be a topic, it can be a post under a topic. It can be a non useful or non meaningful off-topic to a thread.
Off-topic are topics that are not related to any board on this forum. Such topics are moved to off-topic. Also off-topic cannbe a post under a thread. Some are allowed if it is worrh it, nobody will report it. But if it is not worth it, they are often deleted by a moderator because most people reported it to be deleted.