In old myths, 海人 was used as a word for a sea god.
海神 (かいしん) is the more standard modern way to write 'sea god,' while 海人 (かいじん) is an archaic variant used for the same deity.
Written identically as 海人, but read あま it means a shell/seaweed diver, whereas read かいじん it is an archaic word for a seashore dweller or fisherman.
counter for people
The exact derivation is uncertain; the kanji 海 (sea) and 人 (person) combine to suggest a person of the sea, while the sea god sense may be an extension or separate usage.