They can distinguish whether the entity is living or non living by checking whether they have all the seven characteristics of living things.
These 7 characteristics include:
Movement
Respiration
Sensitivity
Growth
Reproduction
Excretion
Nutrition.
If the entity does show all these seven characteristics, it should be a living organism.
In the past, scientists by using these 7 characteristics, they sorted living things in 5 kingdoms(plus virus), each with their own other characteristics.