Input files for pw.x may be either written by hand or produced via the PWgui graphical interface by Anton Kokalj, included in the QUANTUM ESPRESSO distribution. See PWgui-x.y.z/INSTALL (where x.y.z is the version number) for more info on PWgui, or GUI/README if you are using sources from the repository.
You may take the tests (in test-suite/) and examples (in PW/examples/) distributed with QUANTUM ESPRESSO as templates for writing your own input files. You may find input files (typically with names ending with .in) either in test-suite/pw_*/ or in the various PW/examples/*/results/ subdirectories, after you have run the examples. All examples contain a README file.