Originally derived from verb 懐く(natsuku, “to get used to and keep close; to become fond of”), itself an abbreviation of 馴れ付く(naretsuku) of the same meaning. The adjective originally described wanting to keep something close, wanting to express fondness for something. Over time, this term was used more to describe reminiscences, leading to the modern meaning.
The second meaning of 懐かしい is largely equivalent to a verb in English, even though it functions grammatically as an adjective. In this regard it is quite similar to the adjectival noun 好き(suki, “liked”). In Japanese, to express a yearning for something, or a slightly nostalgic feeling of missing something, you modify the object that is missed (e.g., home, one's old neighborhood, one's friend, one's cat) with 懐かしい. In this regard, Japanese is quite unlike English.