Attosecond science has paved the way for direct probing of electron dynamics in gases and solids. This review provides an overview of recent attosecond measurements, focusing on the wealth of knowledge obtained by the application of isolated attosecond pulses in studying dynamics in gases and solid-state systems. Attosecond photoelectron and photoion measurements in atoms reveal strong-field tunneling ionization and a delay in the photoemission from different electronic states. These measurements applied to molecules have shed light on ultrafast intramolecular charge migration. Similar approaches are used to understand photoemission processes from core and delocalized electronic states in metal surfaces. Attosecond transient absorption spectroscopy is used to follow the real-time motion of valence electrons and to measure the lifetimes of autoionizing channels in atoms. In solids, it provides the first measurements of bulk electron dynamics, revealing important phenomena such as the timescales governing the switching from an insulator to a metallic state and carrier-carrier interactions.