What is elective surgery?

Not urgent. Surgery that is not urgent. For example a gun shot wound needs to be operated on right away. A knee replacement, though, important can be scheduled ahead of time, electively.
Planned. Elective surgery is one that is planned and is usually done as an outpatient, meaning you go home the same day. It may or may not be for medical reasons. A special kind of elective surgery is cosmetic surgery for cosmesis only.