Allah the Almighty commands as follows regarding the situation of women whose husband died:
“And those who are taken in death among you and leave wives behind – their wives wait four months and ten days by themselves. And when they have fulfilled their term, then there is no blame upon you for what they do with themselves in an acceptable manner. And Allah is All Aware of what you do.” (Al-Baqarah/ The Cow 2:234)
The women whose husband died have to wait for a period of four months and ten days according to this verse. Those women cannot get married before the end of that waiting period. The ban is limited to this only; there is no other ban than getting married.
The women who are requested to stay at home are the ones divorced by their husbands. Besides, “waiting in the house” means “not moving out of that house”. Going out of the house for any of their needs is legal for women within the waiting period.