If you upload a file, it stores the file temporarily in file_managed table in database.And you have to set the file permanent status 1 to save it permanently else it will be deleted from the table by cron after some time.
This sample code to load a image and save it to database might help you to understand.
/* Fetch the array of the image file stored temporarily in database */
$image = $form_state->getValue ('image');
/* Load the object of the image file by it's fid */
$file = File::load ($image[0]);
/* Set the status flag permanent of the image file object */
$file->setPermanent();
/* Save the file in database ( "managed_file" table) */
$file->save();
when you select any file from 'managed_file' field type, drupal make a entry in 'file_managed' table, you just have to set the permanent flag as above to decide whether you have to save it permanently or not.