A magic number is a hard-coded numerical value that may lack context or meaning. They should not be used because they can make the code less readable and maintainable.
Magic numbers make the code more complex to understand as it requires the reader to have knowledge about the global context to understand the number itself.