Compounding is preparing a unique product for a specific patient based on a prescription. Compounded products are not FDA approved products, and they are not 'generic' versions of approved products.
Veterinary patients often don't fit the approved medications making compounding necessary. With so many species and various sizes within each species, medications are needed in a wide range of dosages as well as a variety of dosage forms that just aren't available as manufactured products.
Compounding has a wide range of benefits in veterinary medicine. It can be used to create a capsule or suspension for a patient that requires 1/10 of the available tablet strength. It can be used to prepare transdermal methimazole for a hyperthyroid cat that the owners are unable to medicate orally, or for providing butterscotch flavored bute paste for a horse.
Each state has its own rules and regulations regarding compounding. Some states allow veterinarians to order some compounded medications for office use, while other states require all compounded medications to be prescribed to a specific patient.