The oil pressure switch is typically located on the engine block, near the oil filter. You'll likely find it on the driver's side (left side, as you're sitting in the car) of the engine, but its exact position can vary slightly.
To locate it, you'll need to:
1. Consult a repair manual: A Haynes or Chilton manual specific to your 1997 Pontiac Sunfire 2.4L will have a diagram showing the exact location. This is the most reliable method.
2. Visually inspect the engine: Look near the oil filter for a small, single-wire electrical connector. This connector will be attached to a small switch—that's your oil pressure switch. It may be a little difficult to see, so a flashlight and maybe even some cleaning to remove grime will help.
Important Note: Be careful when working near hot engine parts. Let the engine cool completely before attempting to locate the switch.