With lilies (and plants of Liliaceae, Amaryllidaceae, Iridaceae and Alliaceae), there is a set of the three (sepals) that are attached to the stem behind the other set of three (petals) . With Lilium, the petals usually are more broad, but that is not what sets them apart as petals. It is the position.
With most plants that have sepals and petals, it's usually easier to differentiate because they look quite different, but the sepals will always be behind the petals. Some flowers only have patals and no sepals, some have sepals and no petals, some have no petals or sepals, some have bracts that look like petals (or sepals). Mother nature is incredibly diverse!