Segwit (short for Segregated Witness) - is a protocol upgrade that changes the way data is stored. It was activated on Litecoin on May 10, 2017, and on Bitcoin on 23 August, 2017.
Many hailed it as a long-awaited solution to bitcoin’s scaling problem. The maximum block size in the main protocol is 1MB, which restricts the number of transactions bitcoin can process to approximately 7 per second. This was going to limit bitcoin’s potential growth, and prevent it from becoming a usable high-volume payment system.
While the upgrade does enable a greater number of transactions in bitcoin’s blocks, SegWit’s initial intention was to fix a bug in the bitcoin code called transaction malleability. This flaw allowed anyone to change small details that modified the transaction id (and the subsequent hash) but not the content. While not a critical problem for bitcoin, it prevented the development of more complex features such as second-layer protocols and smart contracts.
SegWit fixed transaction malleability by removing the signature information (otherwise known as the “witness” information) and storing it outside the base transaction block. With that, signatures and scripts can be changed without affecting the transaction id.