Some places have machines, others don't. I would say 30% have machines bit things change quickly on the Camino and there may be more. This being said, they are expensive. It is not unsual to be charged 3-5 € for washing only. Then pay more for drying. Hence the benefit of sharing a laod.
A nylon mesh bag can work well if you are shy about handling someone else's unmentionables, otherwise, it really is not necessary. You can most likely find one at your local dollar store.
Honnestly, washing is not the issue, drying is. You can walk another day in dirty clothes, but in wet clothes... not so much.
I only use a washing machine if I've been walking through mud all day or after a week or so of walking to give my fleece, liner, etc a good wash.
Sometimes you will have access to the machines yourself, other times you will hand your items to the hospi. They don't like it when we break their machines, and European machines are a totally different animal than North American machines. For one thing, they take forever to do a laundry cycle. When in doubt, ask for help. That will earn you brownie points with the hospy.
Some machines now dispense detergent themselves. If not albergues may sell it. I also travel with a few pods in case, but didn't need them last spring.
Washing by hand and hanging to dry on the line is most common. Bring half a bar of Sunlight soap, or Campsuds. Both work well. Othes will suggest you ise the same soap for body, hair and laundry.
For drying, bring a few safety pins: lighter than clips and less chance of someone mistaken your undies for theirs if yours are hanging with safety pins.