Well, it's really up to the map designer where waypoints should be located. Look at your map, where would you make a path? Mark a waypoint at any spot where the character would change directions. Store the coordinates of each waypoint in an array.
Look at the image. Say you're trying to get from the green square to the blue square. The red shows you two paths, which are pre-determined by you. You simple decided where you want to allow people to go on your map. Then yellow squares mark points where a path can change. Those are your waypoints. Each waypoint will point you to the next one. Once you reach it, see where it tells you to go next. Waypoints, in a sense, act as road signs.
In this example, the path splits two different directions. You can either let the user choose which way to go, take the shortest path to the destination (by calculating the remaining distance of each path), or just jump to the next closest waypoint (as you have suggested).
Your waypoints are in an array, so loop through all your waypoints and check your current distance from them. To find the closest, you'll need to check them all, except for two; the one you're current at and the one you just came from (unless you want to just keep walking back and forth). When you've determine which point is closer, move there.