Ants, worms and flies all have brains (we can see them in a microscope), but they are much smaller than our brains (250K neurons vs the billions we have). Their brains are mostly used to control movement and basic life, like their heartbeat and breathing. As far as we know, and we could be wrong, they don't have a conscious mind or the part of the brain that gives it. They are living, but are probably not aware they are alive, similar to how a single cell organism just moves around does it's thing, but we would not say it has a consciousness.
As a side note, ants make up for their limited brain by working in large groups, so the entire group might have the brain power of human, but no single ant has much consciousness/intelligence on their own.