In programming, semicolons are used to indicate the end of a statement, which allows the computer to know when one statement ends, and another begins. Without the semicolon, it would be difficult for the computer to determine where one statement ends and another begins, which would lead to errors in the code.