Over the last decade, ultrafast time-resolved X-ray absorption spectroscopy (XAS) has evolved to be now a mature and well-established experimental technique, giving extremely detailed information about the local geometrical and electronic structure in the early stages of a chemical reaction or biological process. Electronic structure changes are the fundamental driving forces triggering structural modifications in many chemical and biological reactions. Ultrafast time-resolved XAS is an ideal experimental technique to probe these changes in "real time" during the course of a chemical reaction, a biological function or a physical process. Ideally, the observation of ultrafast processes is made in conditions as close as possible as the natural ones, i.e., biological processes in physiological media (instead of crystals or frozen films). In this sense XAS offers unique capabilities, since it can be applied to any kind of system. In this thesis we successfully implemented a new scheme for measuring time-resolved XAS spectra with picosecond temporal resolution at MHz repetition rate. The increase in the data acquisition repetition rate provided an increase in the signal-to-noise (S/N) of a factor of > 20 compared to previous experiments in the kHz regime. To assess the improvements in this new data acquisition methodology, we used the light-induced spin transition in aqueous solutions of [Fe(bpy)3]2+ to benchmark our experiments. This system has been well-characterized by both ultrafast laser and x-ray time-resolved spectroscopies. The expected gain in data quality was confirmed, which allowed the recording of subtle changes in the pre-edge region of the XAS spectrum, reflecting the different electronic structure of [Fe(bpy)3]2+ upon the spin transition. We also present the investigation of the electronic and geometric structures of a series of metalloproteins (Myoglobin) in physiological solutions by means of X-ray absorption spectroscopy. To our knowledge, this is the first study of the structure of the different forms of Myoglobin in physiological media using XAS. The analysis of the XANES region of the spectrum using full-multiple scattering (FMS) formalism revealed that the ironnitrogen bond length in the porphyrins ring converged to a common value of about 2 Å, in contrast to the wide variation found in the crystallographic structures. Porphyrins are known to be very rigid structures due to the big number of carbon-carbon double bounds, supporting our conclusion. The relative geometry of the ligands with respect to the heme is reported for the whole series of Myoglobins investigated. In addition, time-resolved XAS has been measured for two types of Myoglobin, Carboxy-Myoglobin (MbCO) and (Nitrosyl-Myoglobin) MbNO. It has been shown that, as expected from previous studies, the transient structure of photo-excited MbCO resembles that of the deligated ferrous Myoglobin (deoxyMb). On the other hand, the transient structure of photo-excited MbNO at 50 ps deviates slightly from that of deoxyMb. The analysis of the transient XANES indicates that the NO molecule moves 2.88 Å away from the heme, staying closer to the iron atom than in the case of photo-excited MbCO. The NO geminate recombination time with the heme was also measured in "real time", and it has been found to occur in 216 ± 24 ps. This is the first direct measurement, i.e. sensitive to structural changes, of this geminate recombination time.