To the trained eye, you tell by looking at their posteriors. There used to be a career in this as no one wanted to use up lots of chicken feed on little roosters-to-be who would never lay any eggs. Later there were cross-breeds (e.g. Wyandotte x Barred Rock, Leghorn x Barred Rock) where the male chicks could be immediately identified by the colour of their heads.
Usually though by 6 weeks you should be seeing combs on male chicks. If all your chicks had some comb development this early, then you may be unlucky and have all boys. If not, then you may be lucky and have all girls. There are other clues - males tend to be heavier, braver, thicker legged, with spurs and less rounded heads.