A good question and...perhaps not something we can explain in one sentence...unfortunately!
How long a scented candle lasts is dependent on a huge variety of factors, these include but are not limited to:
Volumetric size of wax - how much does the wax in the candle weigh? NOT the total candle weight including the container, we mean the Net Weight? It should say on the box or label. A small 15 gram tealight for example, may last up to 4 hours. A 500 gram scented candle, may last up to 50+ hours!
Room Conditions - is the candle in a draughty room? do people walk past the candle a lot? Any of these factors alter the burn profile of the wick and therefore may increase or decrease the burn time of the candle.
Size of the Wick - large wicks consume a lot of oxygen and burn fragrance oils and wax more quickly. A correctly sized wick, for the container in use, will melt the wax almost to the edge of the container, perhaps leaving a small 1mm wax edge. This is called the 'melt pool' and is a good way of judging the quality of the candle and its manufacturer.
Tunnelling - connected to the answer above. If a wick is not big enough for the container and volume of wax used, it will start to burrow or 'tunnel' in to the centre of the container. It won't burn all of the wax and, eventually, it will become impossible to light the wick - darn it!
Fragrance Oils - different oils have different burn off temperatures. Some fragrane oils will begin to burn and release aroma at just 50 degrees celsius. Others may require the temperature to reach 80 degrees or more. This will impact the burn rate of the candle in question.
The Wax - depending on the type of wax, Coconut? Soy? Paraffin? CocoSoy Blend? - each different variant burns at a different rate.
How to find out how long a scented candle lasts? It should tell you. On the box, there will be an estimated burn time. Something like (40+ hours). It cannot be completely accurate, as it depends on room conditions, temperatures and the amount of wax remaining.