Nuclear magnetic resonance (NMR) and nuclear quadrupole resonance (NQR) techniques have supplied us with unique information on local incoherent phenomenon as well as low frequency magnetic response of electronic systems. Some of recent advances in the studies of high-Tc cuprate superconductors are based on site-selective measurements of the local electronic state and the local electron spin dynamics. High-Tc superconductors YBa2Cu3O 7−δ (the optimal Tc = 93 K) and YBa2Cu4O8 (Tc = 82 K) with double-layer CuO2 planes have been studied by NMR and NQR techniques. From the intensive studies at the early stage, two-dimensional antiferromagnetic spin fluctuations and pseudo spin-gap in the magnetic excitation spectrum turned out to be key ingredients to characterize the novel electronic states, associated with the occurrence of superconductivity. Wipeout effect is a new key to characterize superconductor-insulator boundary in the lightly doped regime and impurity substitution effects. What happens near in-plane impurities and inside vortex cores in such novel electronic states? Nonmagnetic impurity Zn decreases Tc of the d-wave superconductivity because of the breakdown of Anderson theorem. From the careful NMR and NQR studies, it was concluded that the pseudo spin-gap in the normal state is robust for the substitution of nonmagnetic impurity Zn and magnetic impurity Ni. In the vicinity of a superconductor-insulator boundary induced by impurity, however, the pseudo spin-gap is suppressed. Collapse of low energy pseudo spin-gap due to the heavily substituted impurity Zn was also evidenced by neutron scattering measurements. For the impurity-substituted samples and in the vortex state of pure samples, the characteristic NMR and NQR spectra were observed. The local enhancement of magnetic correlation near the impurity Zn and inside the vortex core was observed from the frequency distribution of nuclear spin-lattice relation time T1. Scanning tunneling spectroscopy detects local density of states of electrons near Zn in the superconducting state. NMR and NQR experiments detect the local magnetism near Zn and inside the vortex cores.