A luxury is something that is pleasant to have or experience, but it is not necessary. For example, eating in a restaurant is a luxury — you can always cook and eat at home.
In its earliest days, luxury meant "excess that is sinfully self-indulgent." Over time, this definition softened, losing the air of judgment, but retaining the sense that a luxury is enjoyable or comfortable, but not necessary. We often think of a luxury as something costly, but this isn't always so. For example, being able to sleep late or live within walking distance of loved ones or a beautiful forest can also be luxuries.