إِنَّ الْعِلْمَ نَافِعٌ
Translation: Indeed, knowledge is beneficial.
«إِنَّ» introduces an emphatic statement; «الْعِلْمَ» is accusative ism and «نَافِعٌ» nominative khabar.
سَمِعْتُ أَنَّ الْعِلْمَ نَافِعٌ
Translation: I heard that knowledge is beneficial.
«تُ» is the subject of «سَمِعْتُ». «أَنَّ» introduces the content heard; «الْعِلْمَ» is its accusative ism and «نَافِعٌ» its nominative khabar. The anna-clause as a unit provides the content of hearing.