Clams that are alive should be slightly open and when you gently tap the clams the clams should close.
If the clams close when tapped lightly the clams are alive and are okay to cook and eat.
However if you tap the clams and the clams remain open then they are likely dead and should be thrown out because dead clams can make you sick when you eat them.
When dead the clams can have bacteria on them which can cause food poisoning.
So always make sure the clams are alive before you kill them and cook them to eat.
Always wait to kill the clams until you're ready to actually cook the clams.
Keep the clams in the refrigerator or freezer until you're ready to kill them or cook them as well.