Charged particles such as sodium and potassium ions cannot cross cell membranes, so they either have to pass through ion channel proteins in facilitated diffusion, or be pushed through using energy via active transport. In both of these cases, a protein structure which spans the whole thickness of the membrane allows passage of charged particles that normally would be repelled by the membrane.
Whether the passage of ions across a cell membrane requires any energy input depends on the relative concentrations of those ions inside and outside the cell. In some cases, as with sodium and potassium, cells need to keep the concentrations of each type of ion imbalanced between the interior and exterior of the cell. Because this cannot be achieved with passive diffusion, the cell must use active transport.
The transport proteins, in the case of active transport, are capable of using energy to force charged particles from a region of lesser concentration to an area of greater concentration. This energy is generally chemical energy from ATP, although other types of energy, including electron gradients and light energy, are also used. Active transport even sometimes uses the energy from particles moving from high to low concentration to power another particles moving from low to high concentration.