A double-edged sword is something that can have two opposite effects at the same time, such as both helping and hurting:
Social media is a double-edged sword; it connects us but separates us in harmful ways.
A real double-edged sword, is a sword with two cutting edges, like most Western swords of the medieval time period—as seen on TV shows like Game of Thrones. Double-edged swords are dangerous to use because they can easily hurt the person using them.
This common English phrase was first used in print during the 15th century.