You need to go to the court's website in your county to learn how. Usually they have a form that you can fill out and file depending on what kind of motion you're trying to file.
If you are representing yourself (pro se), you may file a motion with the Clerk of Courts of that specific court. Go to the clerk's office and ask for the proper forms. You must have the case number, and the names and addresses of the parties involved and/or the legal counsel of the parties.
You may file a motion by filing a copy of the motion along with a certification of service with the clerk of the court and by sending the same (motion and certification of service) to all of the other parties (or their attorneys if they are represented by counsel). The other party will respond similarly. A hearing may be scheduled.
You will need to know what kind of case you are filing in, and in which court, District, Superior, etc. You should consult your court clerk, they will always help.
You will need to go talk to a lawyer to find out. The lawyer could tell you, what you need to do. Just go in and ask that question and they can help you out. That is what lawyers are for. Call one and find out what is needed from you to file it.