Every state has codes or rules of civil procedure. These are rules that govern court procedure. For instance how motions should be filed and the time in which to respond to a motion.
Such matters as notice requirements, service of process, time requirements for answers and counterclaims, and discovery are established by rules of civil procedure. Judges have some discretion to ignore some rules if their enforcement would cause injustice.