Demand paging is a memory management scheme that loads pages into main memory only when they are requested, reducing the necessity to load all program pages in advance. It involves page replacement algorithms like FIFO, optimal, and LRU to manage the pages when memory is full, using valid-invalid bits to track page status. While demand paging facilitates multitasking and efficient memory use, it can lead to issues like page faults and thrashing, affecting system performance.