Old English hit, neuter nominative and accusative of third person singular pronoun, from Proto-Germanic demonstrative base *khi- (source also of Old Frisian hit, Dutch het, Gothic hita "it"), from PIE *ko- "this" (see he). Used in place of any neuter noun, hence, as gender faded in Middle English, it took on the meaning "thing or animal spoken about before."
The h- was lost due to being in an unemphasized position, as in modern speech the h- in "give it to him," "ask her," is heard only "in the careful speech of the partially educated" [Weekley]. It "the sex act" is from 1610s; meaning "sex appeal (especially in a woman)" first attested 1904 in works of Rudyard Kipling, popularized 1927 as title of a book by Elinor Glyn, and by application of It Girl to silent-film star Clara Bow (1905-1965). In children's games, the meaning "the one who must tag or catch the others" is attested from 1842.
From Old English as nominative of an impersonal verb or statement when the thing for which it stands is implied (it rains, it pleases me). After an intransitive verb, used transitively for the action denoted, from 1540s (originally in fight it out). That's it "there is no more" is from 1966; this is it "the anticipated or dreaded moment has arrived" is from 1942.