If the ant that you are looking at has wings, have a look at the antennae. A straight antennae means that the ant is male; if the antennae is jointed, then the ant is a female.
Male ants, regardless of whether they are of the winged variety or not, are slightly bigger than the females; though unless you have something to compare them with, this feature will not stand alone in helping you to know what gender the ants are, particularly when you consider that the largest ant in the colony is the queen, and so female.
To be really sure whether you are looking at the queen, or whether the ant is actually a male, have a look at the size of its eyes and its head. Male ants have bigger eyes than the queen, but their heads are smaller than queen ants.
When you are checking ants in an attempt to see whether they are male or female, take care; there are over 12,000 different species of ants in the world and some of them have bigger stings than others. These can cause itching, burning and stinging. Perhaps the wisest course of action would be just to observe from a safe distance; watching ants as they go about their busy lives is fascinating.