Hi Sylvee! As opposed to going through all the lines, I'll concentrate for now on what I think is relevant to your main question, but do ask further if you want more of an explanation, as I or someone else can help out!
$(this) in this code refers to the button that was clicked.
var tour = $(this).closest('.tour');
Finds the closest element with a tour class, in this case it'll be the containing li of the button that was clicked.
You can then grab the discount via
var discount = tour.data('discount');, which grabs the value of the data-discount attribute in that li. The next two lines create a string with that discount and put a span in the li with that message.
And, then, the button is removed with that last line, the