Most smoke detectors use an ion chamber that emits a steady stream of ions that get disrupted when smoke is present, setting off the alarm.
Some smoke detectors use a photoelectric sensor instead that detects changes in a light beam when smoke hits it. Unfortunately, these are more expensive, and not as effective as the radioactive “ion chamber” kind.
The radioactive stuff inside is americium, a man-made element discovered in 1945 by scientists working on the atomic bomb. The scientists created the element by bombarding plutonium with neutrons and gave it a patriotic name because there was a war going on.
The americium in your smoke alarm is made out of spent plutonium from nuclear reactors. The radioactivity itself doesn’t seem to be harmful to living things while in your alarm, because the radioactive rays are absorbed by the air and alarm itself.
However, that changes if the americium comes out and gets handled, inhaled, or swallowed.
Discarding smoke detectors into landfills might not be a great idea, since americium has a half-life of 432 years and may have health and environmental consequences down the road.