Active transport is a process that moves molecules against the concentration gradient and thus requiring energy in the form of ATP.
ATP is an adenosine nucleotide with three phosphate groups containing high energy bonds.
Primary active transport uses ATP directly to move ions and molecules across the cell membrane against the concentration gradient. One example of this is the sodium-potassium pump in nerve cells that transport sodium ions out of the cell and potassium ions in.
As ion pumps move ions in and out of the cell, a difference in charge, called electrical potential builds up on one side of the membrane so that one side has a positive charge and the other a negative charge. This combination of a concentration gradient and an electrical potential across the cell membrane is known as electrochemical gradient which stores potential energy for the cell to use.
Secondary active transport uses an electrochemical gradient as a source of energy to transport ions across the membrane.