I believe that it depends on firstly whether the journal's reviewers gave comprehensive feedback, and secondly if the authors were adequately able to address their reasons for the rejection in the revised paper.
In most cases the rejection is based on probably quality and journal requirements or specifications, supported by comprehensive feedback. All depends on the initial comments by peer reviewers.
If the paper has already been rejected in a journal, it is hard to believe that it will be accepted for a second peer review to the same journal. So you are wasting precious time. Therefore, maybe you should consider sending the article to another journal.
Dear Simona Rodat thanks for your reply mam. Well I received a response from the journal to resubmit my paper after a major revision. They are going to treat my paper as a new submission.
Dear Mohammad Razib Hossain , I am glad to hear that you can resubmit your paper. I wish you much success this time and hopefully you will see your article published soon. Best wishes!
Dear Mohammad Razib Hossain . Since the paper is rejected, it is better to submit it to other good journal of high IF . Because the reasons of rejections including: the subject of the article out of the scope of the journal, or lack of results , or insufficient discussion , lack of data, ..,…..etc not easy to overcome them. So it is better to save time and efforts and to submit to other good journal. Thank you.
Dear Aref Wazwaz thanks again for your great advice sir. The journal office has advised to resubmit to the journal if I can address all the comments. They will treat the paper as a new submission.
Yes dear Mohammad Razib Hossain if the comments are easy and can be managed , then modify your paper according to their comments and resubmit. Wish you the best always.
The chance of re-consideration for fresh review of any manuscript after initial rejection is very slim. Unless the manuscript is thoroughly revised, upgraded and tailored towards the scope of the journal under consideration, submission of such manuscript again to the same journal may be a futile exercise. As suggested by other respondents, it is advised that such manuscript be submitted elsewhere. Hope this helps...
just to add this point to the conversation, while several others already mentioned that a reject most likely diminishes your chances of future acceptance in the same journal:
Many journals, such as the Journal of Medical Internet Research (JMIR), have several subjournals with specific topics and goals. Maybe, in your case, it is possible to ask for a transfer to a subjournal or something alike (maybe there is another affiliation with other journals). In that case, while your paper might not be suitable for the given journal, the further reviewing process with another journal can profit from the initial process and review results, which in some cases get transferred to another editor / journal.
Hence, a rejection can also be seen as a benefit when it comes to submitting the paper somewhere else. It is by no means a rejection of the whole paper and the idea in general. Sometimes, it just doesn't fit with the scope of a specific journal.
I hope I could add a little bit to this converstation. I wish you best of luck with publishing your research!