Every direction of a court or judge, made or entered in writing and not included in a judgment, is denominated an order, and an application for an order is a motion.