The brightness of some objects in the sky does not remain constant over a measurable period of time. There are a number of possible reasons why.
The absolute magnitude of some stars changes over a period of days because of the physics of what is actually happening inside the star. One such type of star is called a Cepheid variable (because the first example was found in the constellation of Cephius).
Why its brightness varies is to do with the balance between the nuclear and gravitational forces inside the star.
Imagine a pair of stars in orbit around each other in the plane lined up with our line of sight. As they eclipse each other the amount of light we see falls.
The actual shape of the light curve will depend on the relative size and shape of the stars and on how much they eclipse each other.
When a giant star collapses it does so spectacularly with an explosion.
The shock wave may stimulate the production of new stars in nebulae by causing regions of gas and dust to collapse.
Depending on how massive the star was we may end up with a neutron star or possibly even a black hole.