Sincerity is the freeing of one's intentions from all impurities in order to come nearer to Allah. It is to ensure that the intentions behind all acts of worship and obedience to Allah are exclusively for His pleasure. It is the perpetual contemplation of the Creator, to the extent that one forgets the creation.
Sincerity is a condition for Allah's acceptance of good deeds performed in accordance with the sunnah of the Prophet, may Allah bless him and grant him peace. Allah has commanded this in the Qur'an:
"And they have been commanded to worship only Allah, being sincere towards Him in their deen and true. (98:5)"
Abu Umama has related that a man once came to the Prophet, may Allah bless him and grant him peace, and said, "What of a man who joined us in the fighting, his intention being for fame and booty?" The Prophet said, "He recieves nothing." The man repeated the question three times and each time the Prophet said, "He receives nothing". Then he said, "Allah only accepts actions that are intended purely for His pleasure."(1)
Abu Sa'id al-Khudri related that the Prophet (sallallaahu `alaihi wasallam) said in his khutba during the farewell pilgrimage, "Allah will bless whoever hears these words and whoever understands them, for it may be that those who pass on this knowledge are not those who will understand it the best. There are three things concerning which the heart of a believer should feel no enmity or malice: devoting one's actions to Allah, giving counsel to the Imams of the Muslims, and being loyal to the majority."(2)
What is meant here is that these three things strengthen the heart, and whoever distinguishes himself in them will have a heart purified from all manner of deceit, corruption and evil.
A servant can only free himself from shaytan through sincere devotion, for Allah tells us in the Quran that Iblis said to Him:
"Except those of Your servants who are sincere. (38:83)"
It has been related that a rigtheous man used to say, "O self, be devout and you will be pure." When any wordly fortune, in which the self finds comfort and towards which the heart inclines, intrudes upon our worship, then it impairs the purity of our efforts and ruins our sincerity. Man is preoccupied with his good fortune and immersed in his desires and appetites; rarely are his actions or acts of worship free of temporary objectives and desires of this kind. For this reason it has been said that whoever secures a single moment of pure devotion to Allah in his life will survive, for devotion is rare and precious, and cleansing the heart of its impurities is an exacting undertaking.
In fact, devotion is the purifying of the heart from all impurities, whether few or many, so that the intention of drawing nearer to Allah is freed from all other motives, except that of seeking His pleasure. This can only come from a lover of Allah, who is so absorbed in contemplation of the next world that there remains in his heart no place for the love of this world. Such a person must be devote and pure in all his actions, even in eating, drinking and answering the calls of nature. With rare exceptions, anyone who is not like this will find the door of devotion closed in his face.
The everyday actions of a person who is overwhelmed by his or her love for Allah and the akhira are characterised by his love and they are, in fact, pure devotion. In the same way, anyone whose soul is overwhelmed by love for and preoccupation with this world, or status and authority, will be so overwhelmed by these things that no act of worship, be it prayer or fasting, will be acceptable, except in very rare cases.
The remedy for love of this world is to break the worldly desires of the self, ending its greed for this world and purifying it in preparation for the next world. This will then become the state of the heart and sincere devotion will become easier to attain. There are a great many actions where a man acts, thinking they are purely intended for Allah's pleasure, but he is deluded, for he fails to see the defects in them.
Source:
https://www.spubs.com/sps/sp.cfm?subsecID=TZK01&articleID=TZK010002&articlePages=1