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 a judge, it may be enforced as an order of the court.
Ca. Civ. Proc. Code § 525