Overall meaning :
Allah Almighty opens this noble surah with one of the disconnected letters of the Arabic alphabet, namely noon. A brief discussion of these disconnected letters is to be found at the beginning of Surat Al-Baqarah.
I swear by the pen and what everyone writes that you, Muhammad, are not a madman as the unbelievers claim, thanks to the favour of your Lord who has bestowed prophethood and right guidance on you. You will have a great, undiminished and never-ending reward. You are truly a man of great moral character.
Before long you and the unbelieving Quraysh idolaters will see and learn which of you is afflicted with madness and has strayed from the truth! Your Lord, Muhammad, knows best those who have strayed from the path of truth, and He also knows best those who are rightly guided.