Ghaib means hidden or unseen. It refers more broadly to the information of that which was purposely made hidden/unseen.
Anything that is hidden and cannot be seen or sensed or understood by human intellect or knowledge is Ghaib(knowledge of Unseen). In Islam, Muslims are obligated to bring Iman bil-Ghaib (knowledge of Unseen).
As per the Holy Quran,
Only Allah knows the ghaieb of the heavens and the earth and only He informs of the ghaieb to whoever He wills from among His Messengers.
Certainly, He bestowed the knowledge of ghaieb as much as He willed to His beloved Prophet Muhammad