Generally speaking, most hostels will welcome guests of all ages and those over the age of 18 years old are free to book accommodation and stay as a solo traveller in a dorm or private room. I've stayed in many a hostel and never once heard the front desk staff turn someone away due to their age.