We see here “bow down thine ear” means humble yourself enough that you will hear. Someone can talk all day, but if you do not receive it, you have done nothing. “Apply thine heart unto my knowledge” is speaking of the knowledge of God being applied to the heart.
Verse 18 is an extension of verse 17. The knowledge of God applied to the heart is a pleasant thing. If you keep it hidden away in your heart forever, your words will be coming from a pure heart and you will be speaking pure words. The knowledge God has revealed to you should not be a shame to you, but a joy to speak.