The movement of materials across cell membranes and epithelial layers against an electrochemical gradient, requiring the expenditure of metabolic energy.