The primary reason is that the chlorine in common salt is in its ionized form, Cl-. Chlorine is in a class of chemicals called halogens (located in the second farthest right column of the periodic table), and halogens all have seven electrons in their outermost electron shell. Due to a principle in chemistry called the octet rule, most atoms want to have eight electrons in their outermost shell, which means halogens really want to get that one last electron. This makes un-ionized halogens powerful oxidants, which are in general damaging to the human body. This is why normal chlorine gas (Cl2) is toxic. However, as previously mentioned, the chlorine in table salt is ionized, meaning that it already has that one extra electron. Chlorine ions are relatively unreactive, so they don't really have a harmful effect on the body. In fact, they actually play very important roles in nerve signalling, muscle function, and various other body processes.