If one spouse dies the ther spouse automacilly receives home correct?
Depends which spouse was actually paying the mortgage/paid for the house. If the deceased spouse paid for the house in it's entirety, it is their choice (which they will state in their will) of who the house goes to. If they do not state, it will probably go to the other spouse unless another family member contests the decision (for example, if you'd just married the spouse, who has adult offspring, they would be entitled to challenge the decision of the house going to yourself).
If the mortgage/payment of the house was 50:50, it's not clearcut unless the deceased did leave their share of the house to you. (Although your 50% is still legally yours). If they wish to leave it to someone else, you can go to a court to contest the decision.
If the house was a gift, it depends which of you it was actually gifted too. Although being married to the spouse does usually protect your right to the house (unless you were responsible for their death).