Most European train stations used to have luggage lockers, but these have been removed almost across the board because of security concerns. Today, major stations typically have a staffed luggage storage office (often called "left luggage") with both hourly and daily fees.
Costs vary, but luggage storage offices are more expensive than luggage lockers once were. You can leave items for more than 24 hours, just note the hourly and daily rates when you drop off your bags so you know what the final cost will be.
This service is not offered in every station.