A motion is an application made to a court or judge for the purpose of obtaining a ruling or order directing some act to be done in favor of the applicant.