Sodium ions bind to the pump and a phosphate group from ATP attaches to the pump, causing it to change its shape. In this new shape, the pump releases the three sodium ions and now binds two potassium ions. Once the potassium ions are bound to the pump, the phosphate group detaches. This in turn causes the pump to release the two potassium ions into the cytoplasm.
The ATP here changes the shape of the protein.