In these examples I am using The Giant Asian Mantis (Hierodula Membranacea) but this can apply to most mantids.
I will start with nymphs (non adult mantids). Counting segments is the best indicator of gender. You count the abdominal segments from the bottom. Females have six and males have more. In females the last segment is large. As they near adulthood there can be other differences like the width of the abdomen and the size of the mantis itself but new people to the hobby may not notice these other differences at first.
As far as adult mantids are concerned, experienced mantis keeper should be able to tell on most species at a glance what the gender is. With most mantids the females are more robust in size while the male is more petite. The actual reproductive organs also look very different with the males ending in an upturned cup shape and the females a kind of point. It is important to mention that in some adult mantid species there are other differences between the sexes. For example, with the orchid mantis the males are about an inch long while the females are a medium sized mantis. There can also be differences in shape of various body parts on certain mantids.
Male Nymph: notice the many segments, last segment is small.
Female Nymph: notice six segments with last one being large.
Adult Female: notice width and how abdomen ends in point.
Adult Male: notice long thin abdomen ending in "cup."