Sometimes you have to leave your own house when the police tell you to do so and sometimes you do not.
It all depends on why the cops or police are there at your house in the first place.
If the police have a warrant to enter your home to arrest for or search for somebody then yes you must leave your house and go outside when the police tell you to.
If you do not then you can and will be arrested.
Now if the police just come to your house without a warrant then they cannot make you leave your house unless there's someone they are searching for that they have to arrest for an emergency situation.
For example say a family member robbed a bank, store etc and then went to your house and someone or the police saw that person enter the home.
Then in most places the police can get entry into your home to arrest that person.
Otherwise they must have a warrant to enter the home.