Though it is perfectly fine to help new editors edit pages, don't correct them every time they do something wrong. Let them figure it out themselves, or wait until they ask for help. If they give up, you can fix the error they made and tell them what they did wrong. But if they keep trying to solve the problem, there's no reason to solve it for them, leaving a courtesy clue is enough in problematic cases. If someone else solves the problem for you, you didn't learn anything, and are less likely to keep using Wikipedia in the future.
Examples of helping too much
'Swooping in': If you see a bunch of new edits being made by a new editor trying to solve an error, don't fix the page yourself and walk away, as it makes the new editor feel left out and unneeded.
Unhelpful messages: Even if you are nice to the editor, they will have learned nothing if all the message says is that there is an error or the error has been fixed. Show them how to fix it in the future!
When and where it's okay to help
When they've been trying for days: If the editor can't seem to solve the problem, but is trying very hard to, you can fix the error. However, send them a message showing them the steps needed to solve the problem, and they will have learned something from it.
Through messages: If you really can't help it, then follow the steps directly above. However, if you think more would be learned by the editor if you left them solve it by themselves, you don't have to leave them in the dark. Send them a message telling them that you have noticed how hard they have been working, and if they have any questions to contact you.
When they've given up: If they have seemed to stop editing that page they were struggling on, send them a message saying you have fixed the problem, show them the steps, and that they can ask you for help in the future.
When they ask for it: When a new editor asks you for help, you definitely need to help them, if you are confident with Wikipedia skills. The rule is to not help too much, not to not help at all.
When time is short: If an new editor's article has wound up at Articles for deletion, and you can make a convincing argument that the article isnotable enough to stay, you should make the pro-retention argument for them if they're unable to make a convincing enough one themselves due to inexperience. You'll be making Wikipedia more friendly to its users.
Don't abide by this rule blindly. Assume good faith when deciding whether or not to help new editors, and review this essay if you are unsure. Wikipedia editors are usually good at following this rule, so don't worry and just edit like you usually do.