If the reviewers feel that the paper generally has merit, but is in need of certain reasonable corrections or revisions, they will often write a list of specific changes or improvements that are needed, and recommend acceptance subject to those revisions. This is what people mean when they talk about getting a "minor revisions" or "major revisions" decision on their paper.
Another possibility is "revise and resubmit", where the reviewers aren't convinced whether the paper has merit, or if the errors are fixable, but they explain their concerns and are willing to take another look if you're able to fix the paper to address them.
If they doubt that the paper can be salvaged, or if they don't think the results are interesting enough even if they were corrected, or the paper is generally not up to an appropriate level of rigor and clarity, it'll be rejected. In this case they may not give you very detailed feedback. After all, their goal is to help get good papers published, and if they don't think your paper is ever going to get there, why should they spend time on it?
Generally, it isn't the reviewer's job to help you write a good paper, and you can't use the peer review process as a substitute for your own learning.