Snakes are Very fearful and scared creatures. They take anything bigger than them as predators and their natural reflex makes them attempt to neutralize that threat if they feel threatened.
Now Snakes are cold blooded. They seek heatsources to warm their body or as food source.. So if a Snake enters into your house the first thing you have to do is stay calm. Random movements might scare the snake. Then get the children and elderly of your house to safety. Then call for help. Emergency services that you have in your area, animal control, fire services, etc what ever you can find..
if the snake is cleared then use snake repellents to ensure any similar cases does not happen agaiin..