Agency is defined by as the relation that arises when one person (the principal) manifests assent to another person (the agent) that the agent shall act on the principal's behalf and subject to control, and the agent consents to so act. Although an agency relationship reaquires mutual consent, agency can arise in the absence of a contract because, for example, agency does not require consideration.
Agency is a particularly important topic in business associations courses (as well as in contracts and torts, among others) because business entities cannot act on their own, they must act through natural persons who serve as their agents.
The definition has two important parts that are often disputed in cases. First, the principal must manifest assent that the agent act on the principal's behalf, meaning for the principal rather than for the agent him- or herself. For example, if one person acquires goods from another and resells them, depending on the relationship the first person could be acting for the benefit of (on behalf of) the second person as a sales agent or he or she could be acting on her own behalf as a merchant.
Second, the agent must be subject to the principal's control, at least as to the goals to be achieved. If the purported agent is not subject to the control of the purported principal, an agency relationship is not formed. This doesn't mean that a person is not an agent because he or she exercises professional judgment or independence about the means of performing the agent's work. It simply means that the principal has the right to control the objectives of the agency relationship.
The main reason why it matters whether an agency relationship has been formed is that the agent is said to have the power to affect the legal relations of the principal. This means, for example, that the agent can enter into a contract on behalf of the principal and bind the principal to that contract.
One important type of agency is the employer-employee relationship (also called the master-servant relationship in older terminology). This particular type of agency is important because the employer is generally liable for the torts of an employee within the scope of an employee's employment under respondeat superior, while the principal is generally not liable for torts of a non-employee agent (with important exceptions).