When the government decides to ban the use of a particular coin or note from the currency it is called demonetisation.
It becomes illegal to use the old notes for buying anything.
Example:
For example: On the 8th of November 2016, the Government of India stopped the usage of 1000 and 500 rupee notes that had Mahatma Gandhiโs face on them. This is called demonetization