Think of a bike you ride every day. You fix a flat tyre (a repair), fit winter tyres (adapting to new conditions), add a basket (an improvement) and oil the chain before it rusts (prevention). Software maintenance has the same four kinds. A quiz app that crashes on a blank answer needs corrective maintenance. The same app needs adaptive maintenance when a new phone system stops supporting its old notification method. Adding a timer is perfective; splitting a 900-line file into modules so the next change is easier is preventive.
The hard part is that you are changing code that already works for real people, often code someone else wrote. A safe change follows a loop: reproduce the problem, read enough code to understand why it happens, make the smallest change that fixes it, rerun the tests, and add a test for the case that broke. Skipping the 'understand' step is how one fix creates two new bugs.
Maintenance is not rewriting. Throwing away a messy but working program and starting again feels clean, but the old code holds years of fixes for odd cases nobody wrote down, and the new version has to rediscover them one complaint at a time. Maintenance is also different from building version 1: before release there are no users, so a change cannot break anyone's work. Once the software is released and people rely on it, every change is maintenance.
Think of it like this. Maintaining code is like looking after a house people live in: fix leaks, follow new building rules, add a room, clear the gutters before they overflow, all without moving the family out. You do not knock it down because one room is untidy. Where the comparison falls short: around software, the neighbourhood (operating systems, libraries) keeps changing on its own.
Core idea. Maintenance typically consumes 60-80% of software's total lifetime cost. Writing maintainable code from the start saves enormous effort later.