Extremely bright photons generated at the new generation of synchrotron light sources have made a huge impact on various scientific disciplines ranging from biology to materials science. One of the exciting new developments is the use of x-rays in the field of solid-state spectroscopy. Resonant inelastic x-ray scattering (RIXS) is a powerful new tool for studying momentum-dependent electronic excitations, phonons, and magnons. I will review the historical development and the current status of inelastic x-ray scattering, paying particular attention to the new activities in studying magnetic excitations of high temperature cuprate and pnictide superconductors. Technical challenges as well as theoretical difficulties in understanding RIXS results will be discussed in comparison with inelastic neutron scattering. In addition, I will discuss our recent RIXS investigation of spin and orbital excitations in a spin-orbit Mott insulator Sr2IrO4 and other iridate materials.