What does the instruction "Climb heading [BEARING] to [NAVAID] 2.5 DME" mean?
DME is "Distance Measuring Equipment". It tells you how far you are from the equipment transmitting the signal. This is often co-located with a VOR, or at an airport.


  turn heading 180 degrees to LGA 2.5 DME


So, this means turn due south and continue until you are 2.5 nautical miles from LGA. At this point you're instructed to turn left on to a heading of 040.