Right (The top swimmer in the photo above): To maintain an efficient stroke, the hand should stay to the outside of the centerline, right in line with the shoulder.
Wrong (The bottom swimmer in the photo above): The hand should not cross over the centerline. This not only slows down your stroke, it also strains the shoulder with every pull.
Check Your Stroke
Tarzan Drill. Swim one lap with your head out of the water and watch the entry position of your hands.
Use a snorkel. Keep your face underwater but tilt your head slightly up to watch what happens after your arms enter the water.
Mirror or shadow. Watch your reflection on the bottom of the pool.
Film a friend. Bring a camera to the pool and ask a friend to film from the pool deck. Swim toward them as they film. Review your clip, make adjustments and film again for confirmation.
Stick or board drills. Catch-up drill using a 12-inch wooden dowel or a kickboard turned sideways will prevent crossing over. Make sure to keep your hands at the outside edges of the stick or board when you alternate.