Nostalgic is a word derived from ancient greek.
'Nostos' (Νόστος) means ' the desire to return (to one's homeland)' and 'algos' (Άλγος) means pain.
So, you can say 'nostalgia' as a noun is 'the pain caused by the desire to return'.
And obviously, nostalgic is it's adjective :)