The primary psychoactive component of cannabis is THC (delta-9-tetrahydrocannabinol). There are more than 400 chemical compounds at work in cannabis. Sixty-six of them are other cannabinoids that can induce a variety of effects. One receiving a lot of attention lately is cannabidiol (CBD).
Cannabis can work as a depressant, a stimulant, and a hallucinogen. If forced to choose just one to establish a category, most experts would lean toward hallucinogen.
How can cannabis be a stimulant and a depressant? THC works by putting the brakes on the neurotransmitters gamma-amino butyric acid (GABA) and glutamate. Go figure, GABA is our most prevalent inhibitory (slowing things down) neurotransmitter, and glutamate our most excitatory (ramping things up).