A hen does not know if her eggs are fertilised or not. In fact (much like a human) a rooster can be infertile, so a hen's eggs might not be fertilised even if she is in a flock with a rooster.
Many modern breeds and commercial hybrid hens will do nothing with their eggs other than lay them and walk away. Many have had the instinct to brood [sit on their eggs to hatch them] bred out of them over generations. In a modern egg production facility, you do not want a hen to "go broody". When hens are ready to raise chicks, they will stop laying eggs for that period and it's very hard to convince them to give up the idea.
This does not mean that no hens will brood eggs; many breeds still retain their instincts to mother. Silkies, for instance, are renowned for their desire to sit on eggs. Other breeds, such as Orpingtons, Brahmas, Cochins, Marans, Cornish, and others go broody quite regularly. When a hen that has broody instincts lays an egg, she is forming a 'clutch' of eggs. She does nothing to care for these eggs other than hide them in a secure place until she is ready to sit on them. She will continue to lay eggs in this clutch until she has 'enough', which is a number anywhere from seven to as high as 20-plus. Once there are 'enough' eggs, a hormonal switch will occur that will put her into what's best described as a broody trance. She will stop laying eggs and begin to sit on them instead.
There are very good reasons that she does not sit on the eggs from the beginning. Firstly, she needs to continue to eat and drink so that she doesn't lose body condition and can continue to produce eggs for her clutch. Secondly, all the eggs need to begin developing on the same day. An egg does not start forming a chick as soon as it's laid. Instead, the eggs are kind of in a state of suspended animation. Once an egg is above about 98 degrees Fahrenheit for approximately 24 hours, however, it will begin to develop. This way, all the chicks start developing when the hen settles down to sit on them and are all developing at the same time. Then all the chicks will hatch over a short period (usually less than 24 hours) and are all ready to venture out for food.
Two to three days after the first chick has hatched, the mother hen will come out of her broody trance and start to care for the chicks. In the meantime, the chicks will all stay under the mother and require no food or water; they are fed from the remnants of the yolk that is in their body for this purpose. The mother will care for them for a while – the exact time is different for each mother hen. Some care for them only until they are 12 weeks old, some will care for them longer.
This is an edited answer from What does a hen do with her unfertilised eggs? which originally appeared on Quora: The best answer to any question. Ask a question, get a great answer. Learn from experts and get insider knowledge. You can follow Quora on Twitter, Facebook, and Google+.