An injunction is a writ or order requiring a person to refrain from a particular act it may be granted by the court in which the action is brought or by a judge thereof, and when granted by the judge it may be enforced as an order of the court. SOURCE: CCP § 525.