Laser-induced Breakdown Spectroscopy (LIBS) is a techqniue in which a laser is focused onto a surface such that there is a large power density (~ 1 GW/cm2). The surface is super heated (1000's of degrees) and breaks down into small bits of dust, molecules and individual atoms which are accelerated away from the laser spot (ejected). This usually results in a "spot" less than pinprick sized but that depends on laser power, laser pulse width and the focused laser spot size.
Since the ejected material is hot it not only glows like a hot burner on a stove (or the sun) but also the excited atoms emit distinct colors of light. In the LIBS technique, this emitted light is captured and split into colors by a spectrometer, which is like a prism with a camera attached to it. The measured wavelengths (colors) of this atomically emitted light correspond directly to the atom which emitted it. Thus this technique is able to acurately determine the chemical composition of any material whether it is gas, liquid or solid. There is a bit more to LIBS but that is the gist of it.
The Mars Curiosity rover (formerly known as MSL) has a LIBS system in an instrument package known as ChemCam. This instrument was a collaboration between the French Space Agency and Los Alamos National Lab. While I at LANL I was priviledged to do a lot of LIBS work, including building a lab mock-up of ChemCam including martian pressure. This mock-up allowed us to test hundreds of different types rocks that Curosity might actually encounter on the martian surface. It should soon be replaced with flight spares and rocks will be testing on earth and matched to those seen on Mars by the ChemCam instrument.
You may be intersted in reading an article I wrote for an online newspaper article about Curiosity and its instrument packages. I am rather excited for it to land successfully and do loads of fun science!