The apex is the point in a corner where you're closest to the inner edge. When driving through a corner you want to have as high speed as possible, making an "out-in-out" maneuver will let you use the entire width of the track, making the corner less sharp and letting you maintain a higher speed. You start on the outer edge of the track (relative to the corner), steer in to inner edge (and the point where you're the closest to the inner edge is where the apex is) and then steer out to the outer again during exit. The apex is not a fixed point that always is at the same place, you can take an early apex, a late apex or an apex somewhere in between. An ideal apex is usually an apex that will give you as high speed as possible when exiting a corner, but that is not always true as it also depends on what's coming up after the corner. If there's a complex section of corners it's better to chose an apex throughout the corners that will give you the best approach for the following corners and then the highest speed out from the last corner. For instance, if there's an S-curve I would go for a late apex in the first corner, letting me exit that corner closer to the inner edge of the track. For the second corner of the S-curve I will then be in a better position to make an out-in-out maneuver with a mid apex, giving me higher speed when exiting the S-curve.
To hit a good apex through a corner, it's important to know the corner well; how sharp is the corner?; how wide is the road?; how many degrees are the corner?; are there any bumps or other inconsistencies in the road that you would want to avoid because they might set your car out of balance or that you would want to aim for because they can provide extra grip? (<-- there's some pretty interesting corners @ Nordschleife regarding that). It's also good to keep in mind where the other traffic around you is, if there's a car side by side common sense will tell you that you can't both hit the same apex at the same time, so either one of you will have to let the other go first or you will have to aim for different apexes (one early and one late, for instance), or you will have to go side by side through the corner making the corner effectively sharper, reducing the speed of both of you.
When overtaking in a corner, you can also think of different apex strategies. You can go on the inside, aiming for an early apex, which will reduce your speed a lot, but might give you space enough to hit the gap in front of the other car, letting you overtake and then hoping that your car will block the road enough to not let the other driver take advantage of his better apex. You can also start on the inside, faking an overtake attempt, hopefully making the other driver steer in to an early apex to block you, while you can easily steer out again, making a late apex instead and getting a higher speed out on the following straight, enough to make a clear pass.