Yes, hostels will require a form of identification upon check-in, which is usually your passport that they'll scan.