The central nervous system (CNS) is composed of the brain and the spinal cord and functions mainly to process information and determine the correct response.
The peripheral nervous system (PNS) is composed of all the sensory and motor neurons of the body and functions to gather information and to control the actions of our bodies.
The PNS takes in information through sensory neurons then sends it to the CNS to be processed. After processing, the CNS "tells" the PNS what to do e.g. what muscles to flex, whether the lungs need more oxygen or which limbs need more blood, and any other biological processes. The PNS then makes it happen through muscle control.