A compound word is a word made up of two or more words put together.
foot + ball = football
Both parts of the word must be proper words for it to count as a compound word.
un + lucky = unlucky
This is not a compound word because un is a prefix and not a proper word.