That is:

Urinary excretion rate = Filtration rate – Reabsorption rate + Secretion rateAlthough the strictest sense of the word excretion with respect to the urinary system is urination itself, renal clearance is also conventionally called excretion (for example, in the set term fractional excretion of sodium). Filtration
The blood is filtered by nephrons, the functional units of the kidney. Each nephron begins in a renal corpuscle, which is composed of a glomerulus enclosed in a Bowmans capsule. Cells, proteins, and other large molecules are filtered out of the glomerulus by a process of ultrafiltration, leaving an ultrafiltrate that resembles plasma (except that the ultrafiltrate has negligible plasma proteins) to enter Bowmans space. Filtration is driven by Starling forces. The ultrafiltrate is passed through, in turn, the proximal convoluted tubule, the loop of Henle, the distal convoluted tubule, and a series of collecting ducts to form urine. Reabsorption
Tubular reabsorption is the process by which solutes and water are removed from the tubular fluid and transported into the blood. It is called reabsorption (and not absorption) both because these substances have already been absorbed once (particularly in the intestines) and because the body is reclaiming them from a postglomerular fluid stream that is well on its way to becoming urine (that is, they will soon be lost to the urine unless they are reclaimed).
Substances mainly secreted into renal tubule are; H+, K+, NH3, urea, creatinine, histamine and drugs like penicillin. Tubular secretion occurs at Proximal Convoluted Tubule (PCT) and Distal Convoluted Tubule (DCT); for example, at proximal convoluted tubule, potassium is secreted by means of sodium-potassium pump, hydrogen ion is secreted by means of active transport and co-transport, i.e. antiporter, and ammonia diffuses into renal tubule. Other functions
Hormone secretion
The kidneys secrete a variety of hormones, including erythropoietin, calcitriol, and renin. Erythropoietin is released in response to hypoxia (low levels of oxygen at tissue level) in the renal circulation. It stimulates erythropoiesis (production of red blood cells) in the bone marrow. Calcitriol, the activated form of vitamin D, promotes intestinal absorption of calcium and the renal reabsorption of phosphate. Renin is an enzyme which regulates angiotensin and aldosterone levels. Maintaining homeostasis
The kidney is responsible for maintaining a balance of the following substances:

The body is very sensitive to its pH. Outside the range of pH that is compatible with life, proteins are denatured and digested, enzymes lose their ability to function, and the body is unable to sustain itself. The kidneys maintain acid-base homeostasis by regulating the pH of the blood plasma. Gains and losses of acid and base must be balanced. Acids are divided into "volatile acids" and "nonvolatile acids". See also titratable acid. The major homeostatic control point for maintaining this stable balance is renal excretion.