Looking through the curve
Look where you want to go. That would either be the exit of the curve/turn or as far up as you can see, if it's a blind curve. If you stare at the guardrail, curb, or divider lines because you are worried about hitting or crossing them, strange and bad things happen:
In addition to the safety aspects, looking further ahead also makes riding more fun, as you can see where the apex is better and hit your acceleration point at the right time more easily.
Like all things, this does take some practice. Lots of people are worried about the road surface and only look a short ways in front of them. You have to become familiar enough with your bike to be able to pick a line, keep on it, and let the suspension do its work without looking down at the ground. If your suspension is working correctly, you have good tires, and the tires are at the right pressure, then you should be able to gradually get to where looking ahead is standard practice. It really does make riding more enjoyable.
This is not to say you should ignore the road immediately in front of you; just don't focus on it. Focus on looking down the road and through the corner, and use your peripheral vision and/or quick glances to monitor for near-distance "problems" in front of you that may warrant making adjustments. Once you identify a near-distance problem that you need to avoid, focus on looking where you want to go and not at the problem. If you look at where you don't want to go, chances are that's where you'll end up.