Hazrat Mufti Ebrahim Salejee (Daamat Barakaatuhu) mentioned:
The trick of Shaitaan is that he does not allow you to do the work which you are supposed to be doing. A person studying in madrasah hears the virtues of jihaad and then desires to go in jihaad. Then while in jamaat and jihaad he hears about how people are learning deen etc. so he feels that I should rather be in madrasah acquiring the knowledge of Deen. This is the ploy of Shaitaan. The correct thing is to be focused on the path of Deen and fulfil whatever is required of you at that moment. One can only be focused if one has a guide to show him the path, otherwise Shaitaan will be his guide.