Somebody is an indefinite pronoun referring to a certain unspecified person. Some body is a noun phrase referring to a certain unspecified body.
When I went into the laboratory, I saw somebody wearing a respirator.
When I went to the morgue, I saw some body
See also anybody/any body.