Apricot kernels are the seeds of apricot trees (Prunus armeniaca), which are contained inside the woody shell that comprises the pit of the apricot fruit. Depending on the cultivar, some apricot kernels are so sweet they taste like almonds. These apricot kernels are used to make almond jelly, a famous Chinese dessert which is not actually made of almonds, but rather, ground-up apricot kernels.
Apricot kernels have a reputation as an anti-cancer food, because they are loaded with "vitamin B17," which is believed by many people to have prophylactic effects against cancer, despite scientific studies failing to find any evidence of this.
What science does tell us is that people should be careful when eating apricot kernels, because they also have relatively high amounts of the deadly poison cyanide. On average, an apricot kernel has about 0.5 mg of cyanide, and normally about 200 mg is needed to kill an adult, so it would require eating 400 apricot kernels in a short span of time to reach deadly levels of cyanide.
Nevertheless, some batches of apricot kernels have been found to have significantly higher levels of cyanide than average, so some caution is probably warranted. In recent years there have been no reported deaths from eating apricot kernels in the United States, and only a few cases of cyanide toxicity, but people are getting stupider all the time, so you never say never.