A filament based electric bulb generates light through a process called incandescence meaning glow associated with a hot-body. Hence this type of lamps are called incandescent lamps. The electric bulb we normally use consists of a coiled filament made of tungsten wire (essentially an electrical resistor) of different thicknesses depending on the power ratings of the lamp.
When the lamp is switched on, an electric current passes through the resistor producing a lot of heating called Joule heating. When the filament is heated to near white-hot, its body temperature rises to a few thousand (s) degrees centigrade which in turn take the tungsten filament near its melting/vaporisation point. On continued usage, this vaporisation leads to loss of the tungsten material making it thinner and thinner at some points along the length of the filament coil.
In order to minimise the vaporisation loss, the whole filament system is enclosed in an evacuated (or filled with inert gases) glass envelope (bulb). When the electric bulb is switched on and off several times, its filament is taken through several cycles of heating and cooling leading to the filament getting worn-out at some points that would result in the filament getting cut at these point(s). This would eventually make flow of current along the filament and hence the incandescent-glow from the bulb impossible.