In addition to @Bakual's answer, let's assume you a simple form like so:
<form name="upload" method="post" enctype="multipart/form-data">
<input type="file" name="file_upload">
To upload the file once the submit button has been pressed, you can use this:
$input = JFactory::getApplication()->input;
$file = $input->files->get('file_upload');
// Cleans the name of teh file by removing weird characters
$filename = JFile::makeSafe($file['name']);
$src = $file['tmp_name'];
$dest = JPATH_BASE . '/modules/mod_mymodule/' . $filename;
if (JFile::upload($src, $dest))
// The file has successfully been uploaded :)
// Oh crap, something happened. Run!
You will obviously need to change the path (
$dest) to whatever suits your needs.
There is a load of validations you should perform when handling uploads, a lot of which can be found on the link you have been provided with already: