For newborns, it's best to just leave them be until it is safe to handle them. Once you can, just check for the respective genitals, it should be obvious enough.
You may not be able to tell this directly after birth; it depends on the thickness of the fur and development of the babies. To tell, simply lift the tail and inspect the genitals (just like you would with a human baby! ); males are usually easier to spot right away.
It can be hard to tell if a kitten is a boy or girl when they're young. When they're older, you can tell because males have testicles and females don't.