Gravitational waves (GWs) from a neutron star merger, GW170817, were discovered by Advanced LIGO and Advanced Virgo. The GW signal was followed by electromagnetic (EM) signals including a gamma-ray burst, uv/optical/IR macronova, long lasting non-thermal emission in multi-wavelength ranging from radio to X-ray. In this talk, I first overview the dynamics and mass ejection of neutron star mergers. Then I will talk about theory of EM signals from neutron star mergers and discuss the EM observations of GW170817. I will focus mostly on the r-process macronova and long-lasting synchrotron radiation signals, and the implications of GW170817 to the amount of r-process elements synthesized in the ejecta and the ejecta's structure. I will also discuss about the budged of r-process elements in the local Universe and show that the overall amount of r-process elements of the Milky Way could have been predominantly produced by mergers, given the rate and mass estimate of GW170817. Finally, I will discuss open issues and future prospects of EM counterparts and the r-process origin.