The first one is the correct way to use it, since it separates the parts of the sentence into fragments that can still be understood without changing the meaning of the entire sentence.
Answer:
Commensalism is a type of symbiotic relationship where one party benefits and the other party is not significantly affected. A hermit crab takes over a discarded shell of a snail and uses it for his house. The hermit crab benefits and the snail are not affected - it's already discarded the shell and is nowhere around.
Explanation: