I often wonder what if your research paper got rejected? Is it fair enough to resubmit that paper in the same journal? Is there any possibility of publication of that paper in any journal?
If your paper is submitted to a journal, and is rejected among other reasons because it is not appropriate to the journal (subject is too obscure/specific, outside the area of interest of the paper, things like that), then you should not resubmit it to the same journal. You consider the comments made; if you believe they are in error for some reason, you contact the editor and explain why you believe they are in error. But this can only be done if they are objective errors. If it is a matter of difference of opinion (the referee thinks the results are not good enough, you do, for example), then you are probably better off going to a different journal unless the report specifically says that you can resubmit after addressing the comments.
It is certainly possible to resubmit to a different journal and get the paper published. Sometimes because the other journal is more appropriate to the paper. Often, because you take to heart the original referee comments and use them to improve the paper.
What you should never do is take a rejected paper and resubmit it as is to the same journal (even to a different editor) unless you have contacted the editor first, discussed why you believe the referee is in error, and the editor invites you to resubmit the manuscript.
You might also want to ask that a different referee be requested; for example, the referee may not be very reliable (after all, they didn't really make it very clear why they disliked the paper).