In many but not all European hostels you can do laundry, the rest will know where you can find a place near where you can do it.
The availability differs between countries, between different hosteling organizations and sometimes even within a single organization, based on the visitors they have and the space they have in their building(s.)
It is not really the money you would spend or save, it is traveling with a much lighter pack that makes the difference, so I would suggest to travel with less luggage.
Hostels sometimes have locks for rent or sale, sometimes have lockers that work with a different kind of locking system but bringing a small lock is always good. If a separate lock works you are allowed to use your own.
For those traveling in hotels rather than hostels, in those it is almost never possible to do your own laundry and where they do offer a laundry service it is often expensive, but they will still usually be able to tell you where in the area you can find a laundrette or dry cleaning service company.
Only hotels meant for long stays often include laundry options.
On the other hand, if you stay in a small family run place it is not unlikely that the owners can do a load for you in their own machine.