Here a geologist is collecting a sample from a small pahoehoe toe. As long as there are only small areas of active incandescent lava, the flow can be approached long enough to collect a blob on the end of a hammer with only gloves, long pants, a long sleeve shirt, and boots for protection (it is still pretty uncomfortable). The sample will be analyzed in a laboratory to determine the chemical constituents. By collecting samples all through an eruption, geologists can study processes that go on down in the magma chamber and even within the mantle where the magma is generated.
Here, geologist Christina Heliker is preparing to take a sample of an 'a'a flow. Unlike pahoehoe flows, 'a'a flows radiate an incredible amount of heat so a lot more protection is required. She will scoop off a blob of the lava and put it into the coffee can. She then pours water into the can to rapidly quench the lava sample. This helps to make sure that the sample does not react with the atmosphere as it cools, and that it will be as pristine as it can be.