tl;dr: Kind of, they twinkle because they’re so far away from Earth. The light from the star travels in a zig-zag through our atmosphere, causing it to “twinkle” in our eyes.
Explanation:
As a star’s light passes through our atmosphere, it gets distorted by the various temperatures and density layers of Earth’s atmosphere. The light gets diffracted causing a dimming and brightening effect to our eyes.
“Why don’t planets twinkle?”
Planets don’t appear to twinkle because many of them are closer than stars. Their size is usually larger than the pockets of air that would distort their light, so the diffraction cancels out.
Stars closer to the horizon will appear to twinkle more than other stars. This is because there is a lot more atmosphere between you and a star near the horizon than between you and a star high in the sky.