Camshaft Position Sensors monitor the rotational position of the camshaft. It provides a signal to the engine control module, which compares the camshaft position with the crankshaft position to determine ignition and fuel injection timing.
The camshaft has a 2x wheel on it that the cam sensor reads to quickly determine where the crank is in regards to the firing order. This is important for the GM sequential fuel injection to be able to fire the engine in just a few seconds.
Electrical components such as sensors are non-returnable parts.
Always refer to a factory service manual when diagnosing engine service problems. You can damage electrical components if the proper procedures are not followed. Be sure you are replacing the correct part.