There are several different types of artificial sweeteners. But generally they are much sweeter than regular sugar, and some cannot be broken down by the body.
For example, Diet Coke is sweetened with aspartame. Aspartame is a protein which tastes 200 times sweeter than sugar. Aspartame has 4 calories per gram, just the same as regular sugar. But because it’s much sweeter, you require much less aspartame (1/200th) to make a drink that has the equivalent sweetness. If 1 can of regular Coke has say 150 calories, then 1 can of Diet Coke would have less than one calorie. So labeling laws allow Coke to label it as having 0 calories.
Another artificial sweetener is Splenda. It also tastes much sweeter than sugar, so you need to use less of it. But also, Splenda cannot be digested by the body so it effectively has 0 calories.