A by-election or bye-election is a type of special election.
A General Election is the name of an election for all members of an elected body. A by-election is the name of an election for just some members.
A by-election could be needed if a member dies or resigns while in political office. They are also used if a person is removed from office for some reason, for example he/she is guilty of a crime or is not qualified to be a member anymore.