An animal is called a protostome or a deuterostome based on the way its body cavity develops.
The embryonic development is different between Protostome and Deuterostome. The first opening in deuterostomes (the blastopore) becomes the anus, while in protostomes, it becomes the mouth. Deuterostomes are Echinodermata, Hemichordata and Chordata. Protostomes are Ecdysozoa, Spiralia and Chaetognatha.