Imaam Abu Muhammad Al-Hasan b. `Alee b. Khalaf al-Barbahaaree (died 329H, rahimahullaah) stated in his Sharhus-Sunnah (point 38):
والنفاق أن يظهر الإسلام باللسان ويخفي الكفر بالضمير
Hypocrisy is to make apparent Islaam upon the tongue and to conceal kufr in the heart.
Explanation of Shaikh al-Fawzaan:
It-haaf al-Qaaree of Shaikh al-Fawzaan:
Hypocrisy is to make apparent goodness and to conceal evil. And it is of two types:
1. An-Nifaaq al-I’tiqaadee (Hypocrisy in Belief)
This is Major Disbelief and the outright hypocrite is worse than an outright unbeliever, who makes apparent that he is not a Muslim. That is because it is known about the outright disbeliever that he is a disbeliever, and that he has enmity – however, the hypocrite deceives the Muslims. He makes manifest that he is from the Muslims whereas in reality he is an enemy to them. He makes apparent that he is a Muslim, whereas [inwardly] he is a disbeliever.
يُخَادِعُونَ اللَّهَ وَالَّذِينَ آمَنُوا وَمَا يَخْدَعُونَ إِلَّا أَنفُسَهُمْ وَمَا يَشْعُرُونَ
“They [think to] deceive Allah and those who believe, but they deceive not except themselves yet they perceive it not.” Baqarah 2:9
For this reason Allaah placed them in the lowest depth of the Hellfire, beneath the worshippers of the idols and the disbelievers, because they are worse than the disbelievers, and He says about them:
هُمُ الْعَدُوُّ فَاحْذَرْهُمْ ۚ قَاتَلَهُمُ اللَّهُ ۖ أَنَّىٰ يُؤْفَكُونَ
“They are the enemy, so beware of them. May Allah destroy them; how are they deluded?” al-Munaafiqoon: 4
Hypocrisy in Belief cannot co-exist with Imaan (faith) ever.
2. The Second category is an-Nifaaq al-‘Amalee (Hypocrisy in Deeds)
This is where a a person is a believer both outwardly and inwardly, however there emanate from him some of the traits of the hypocrites that reduce his Eemaan and he is threatened with severe punishment, but he does not exit the Religion. So this is termed as an-Nifaaq al-‘Amalee or as an-Nifaaq al-Asghar. Concerning this, there is the statement of the Messenger:
أَرْبَعٌ مَنْ كُنَّ فِيهِ كَانَ مُنَافِقًا خَالِصًا : إِذَا حَدَّثَ كَذَبَ , وَإِذَا وَعَدَ أَخْلَفَ , وَإِذَا عَاهَدَ غَدَرَ , وَإِذَا خَاصَمَ فَجَرَ ، فَمَنْ كَانَتْ فِيهِ خَصْلَةٌ مِنْهُنَّ كَانَتْ فِيهِ خَصْلَةٌ مِنَ النِّفَاقِ حَتَّى يَدَعَهَا
“There are four traits when found in a person, they render him a sheer hypocrite. And whoever possesses one of them, he possesses a trait of hypocrisy until he gives it up: If he speaks, he lies. If he makes a promise, he breaks it. If he is given a trust, he proves treacherous, and if he argues, he becomes abusive.” 
 Reported by al-Bukhaaree no. 34, Muslim no. 58. Hadeeth narrated by ‘Abdullaah b. ‘Amr b. al-Aas (radiyallaahu ‘anhumaa)
So there emanates from this believer hypocrisy in deeds from time to time. That is a deficiency in his Eemaan – and he is deserving of the threat of punishment, however he does not exit from the Religion because of it.
And this hypocrisy is also ar-Riyaa (showing off with deeds of piety) which the Messenger (salallaahu a’alaihi wassallam) feared for his Companions and he called it Minor Shirk (ash-Shirk al-Asghar). He said:
“That which I fear for you the most is Minor Shirk” They asked: “And what is Minor Shirk, O Allaah’s Messenger?” He responded: “Ar-Riyaa (showing off with deeds of piety). Allaah will say on the Day of Resurrection when the people will be recompensed for their deeds: “Go to those for whom you used to show-off you deeds or piety in the world. See if you find with them any reward.” 
 Ahmad in Al-Musnad (5/428), Al-Bayhaqee in Shu’b al-Eemaan (5/333), Al-Baghawee in Sharhus-Sunnah (14/323-324) from Mahmood b. Labeed (radiyallaahu ‘anhu). Al-Mundhiree said in At-Targheeb wat-Tarheeb, “Isnaaduhu jayyid (its chain is good)” (1/69).
The Messenger (salallaahu ‘alaihi wassallam) also said:
“Shall I not inform you regarding that which I myself fear for you even more than the Dajjaal?” They said: “Yes, of course.” He said: “Ash-Shirk al-Khafee (the Hidden Shirk). A man stands to pray and he beautifies his prayer when he sees a man looking towards him.” 
 Ahmad in Al-Musnad (3/30), Ibn Maajah in As-Sunan (no. 4204), At-Tahaawee in Sharh Mushkil al-Aathaar (no.1781)
When he prays amongst the people, he beautifies his prayer, but when he prays in his home of in a hidden location, he hastily performs the prayer. This is what the Sahaabah would fear for themselves with a strong fear. And there is not a single person whose soul is free from this affair, so a person should be fearful of it. It is for this reason they (Salaf) would say:
“No one fears it except a believer, and no one feels safe from it except a hypocrite.”
So a Muslims fears for himself from this hypocrisy, and that is the Minor Hypocrisy.
The saying of Imaam al-Barbahaaree (rahimahullaah):
“Hypocrisy is to make apparent Islaam upon the tongue and to conceal Kufr in the heart.”
This is the definition of hypocrisy in belief and that is Major Hypocrisy, and this cannot co-exist with Eemaan and does not ever emanate from a believer. Allaah, the Mighty and Majestic, right at the beginning of Sooratul-Baqarah has divided the people into those who are believers, both outwardly and inwardly, and into people who are disbelievers, both outwardly and inwardly – and also into hypocrites who make apparent Islaam, whilst concealing disbelief. Regarding this Allaah, the Most High, stated:
ذَٰلِكَ الْكِتَابُ لَا رَيْبَ ۛ فِيهِ ۛ هُدًى لِّلْمُتَّقِينَ
This is the Book (the Quran), whereof there is no doubt, a guidance to those who are Al-Muttaqun [the pious and righteous persons who fear Allah much].
الَّذِينَ يُؤْمِنُونَ بِالْغَيْبِ وَيُقِيمُونَ الصَّلَاةَ وَمِمَّا رَزَقْنَاهُمْ يُنفِقُونَ
Who believe in the Unseen and perform the Prayers, and spend out of what we have provided for them.
وَالَّذِينَ يُؤْمِنُونَ بِمَا أُنزِلَ إِلَيْكَ وَمَا أُنزِلَ مِن قَبْلِكَ وَبِالْآخِرَةِ هُمْ يُوقِنُونَ
And who believe in (the Quran and the Sunnah) which has been sent down (revealed) to you (Muhammad Peace be upon him ) and in [the Taurat (Torah) and the Injeel (Gospel), etc.] which were sent down before you and they believe with certainty in the Hereafter.
أُولَٰئِكَ عَلَىٰ هُدًى مِّن رَّبِّهِمْ ۖ وَأُولَٰئِكَ هُمُ الْمُفْلِحُونَ
They are on (true) guidance from their Lord, and they are the successful.
So these verses are concerning the believers, who believe both outwardly and inwardly. As for the the disbelievers who disbelieve both outwardly and inwardly, Allaah stated regarding them:
إِنَّ الَّذِينَ كَفَرُوا سَوَاءٌ عَلَيْهِمْ أَأَنذَرْتَهُمْ أَمْ لَمْ تُنذِرْهُمْ لَا يُؤْمِنُونَ
Verily, those who disbelieve, it is the same to them whether you (O Muhammad) warn them or do not warn them, they will not believe.
خَتَمَ اللَّهُ عَلَىٰ قُلُوبِهِمْ وَعَلَىٰ سَمْعِهِمْ ۖ وَعَلَىٰ أَبْصَارِهِمْ غِشَاوَةٌ ۖ وَلَهُمْ عَذَابٌ عَظِيمٌ
Allah has set a seal on their hearts and on their hearings, (i.e. they are closed from accepting Allah’s Guidance), and on their eyes there is a covering. Theirs will be a great torment.
Then Allaah stated, regarding the third group (the hypocrites):
وَمِنَ النَّاسِ مَن يَقُولُ آمَنَّا بِاللَّهِ وَبِالْيَوْمِ الْآخِرِ وَمَا هُم بِمُؤْمِنِينَ
And of mankind, there are some (hypocrites) who say: “We believe in Allah and the Last Day” while in fact they believe not.
يُخَادِعُونَ اللَّهَ وَالَّذِينَ آمَنُوا وَمَا يَخْدَعُونَ إِلَّا أَنفُسَهُمْ وَمَا يَشْعُرُونَ
They (think to) deceive Allah and those who believe, while they only deceive themselves, and perceive (it) not!
فِي قُلُوبِهِم مَّرَضٌ فَزَادَهُمُ اللَّهُ مَرَضًا ۖ وَلَهُمْ عَذَابٌ أَلِيمٌ بِمَا كَانُوا يَكْذِبُونَ
In their hearts is a disease (of doubt and hypocrisy) and Allah has increased their disease. A painful torment is theirs because they used to tell lies.
وَإِذَا قِيلَ لَهُمْ لَا تُفْسِدُوا فِي الْأَرْضِ قَالُوا إِنَّمَا نَحْنُ مُصْلِحُونَ
And when it is said to them: “Make not mischief on the earth,” they say: “We are only peacemakers.”
أَلَا إِنَّهُمْ هُمُ الْمُفْسِدُونَ وَلَٰكِن لَّا يَشْعُرُونَ
Verily! They are the ones who make mischief, but they perceive not.
وَإِذَا قِيلَ لَهُمْ آمِنُوا كَمَا آمَنَ النَّاسُ قَالُوا أَنُؤْمِنُ كَمَا آمَنَ السُّفَهَاءُ ۗ أَلَا إِنَّهُمْ هُمُ السُّفَهَاءُ وَلَٰكِن لَّا يَعْلَمُونَ
And when it is said to them (hypocrites): “Believe as the people (followers of Muhammad, Al-Ansar and Al-Muhajirun) have believed,” they say: “Shall we believe as the fools have believed?” Verily, they are the fools, but they know not.
وَإِذَا لَقُوا الَّذِينَ آمَنُوا قَالُوا آمَنَّا وَإِذَا خَلَوْا إِلَىٰ شَيَاطِينِهِمْ قَالُوا إِنَّا مَعَكُمْ إِنَّمَا نَحْنُ مُسْتَهْزِئُونَ
And when they meet those who believe, they say: “We believe,” but when they are alone with their Shayatin (devils – polytheists, hypocrites, etc.), they say: “Truly, we are with you; verily, we were but mocking.”
اللَّهُ يَسْتَهْزِئُ بِهِمْ وَيَمُدُّهُمْ فِي طُغْيَانِهِمْ يَعْمَهُونَ
Allah mocks at them and gives them increase in their wrong-doings to wander blindly.
أُولَٰئِكَ الَّذِينَ اشْتَرَوُا الضَّلَالَةَ بِالْهُدَىٰ فَمَا رَبِحَت تِّجَارَتُهُمْ وَمَا كَانُوا مُهْتَدِينَ
These are they who have purchased misguidance for guidance, so their commerce was profitless. And they were not [at all] guided.
مَثَلُهُمْ كَمَثَلِ الَّذِي اسْتَوْقَدَ نَارًا فَلَمَّا أَضَاءَتْ مَا حَوْلَهُ ذَهَبَ اللَّهُ بِنُورِهِمْ وَتَرَكَهُمْ فِي ظُلُمَاتٍ لَّا يُبْصِرُونَ
Their likeness is as the likeness of one who kindled a fire; then, when it lighted all around him, Allah took away their light and left them in darkness. (So) they could not see.
صُمٌّ بُكْمٌ عُمْيٌ فَهُمْ لَا يَرْجِعُونَ
They are deaf, dumb, and blind, so they return not (to the Right Path).
All of these verses are concerning the hypocrites, and they are ten or so verses.
Imaam al-Barbahaaree (rahimahullaah) said:
“Whilst he conceals (dameer) disbelief in his heart.”
Dameer: It’s meaning is that which is concealed in the heart.