Watts are a unit of power, which is the rate of using energy. So watts are joules per second.
A more useful, but confusing unit of energy is the watt-hour, which you can get by multiplying number of watts by number of hours.
So, if your appliance is consuming 40 watts and you want to know how much energy that is in 24 hrs (one day), then multiply by 24 to get 960 watt-hours.
If electricity costs 10 cents per kW-hr, which is 10 cents per 1000 watt-hours, then the applicance costs you:
960 watt-hours x 10 cents /1000 watt-hours = 9 pesos and 60 cents. for the period of 24 hrs.