Despite popular opinion, all hens do not sit on their eggs to hatch them. Broodiness has been bred out of most hatchery birds, because it interferes with egg production. A broody hen will lay a clutch of eggs, then stop and "set" on them for 3 weeks until they hatch. Afterwards, she still won't lay whilst she's raising the chicks, anywhere from 3 to 6 weeks. This puts a crimp in the egg-laying businesses.
Some breeds are more likely to go broody than others. It's hormonal and cannot be "inspired" by the chicken-keeper. A hen either goes broody or she doesn't.
When she does, she sits in the nest (and, by the way, they can go broody without any eggs to hatch at all, or on infertile eggs - she just knows she wants to be a mommy!) 24/7 with only one or two brief breaks to go potty off the nest, get a drink of water and snatch some food. Maybe get a dust bath but that's about it. She will not roost. She will puff up her feathers and make a horribly mean, growling sound if you reach for her (or her eggs). They go almost into trance whilst broody, too. They expend very little energy during this time, so the fact that they only eat once or twice doesn't impact their health all that much, although they WILL lose weight during their "confinement."
Hope that helps explain it!