Memory allocation is like giving everyone in your class their own desk to work on.
Just like how you have a desk to keep your books, pencils, and paper, programs and files need their own space to store information. Memory allocation is when a computer program requests a certain amount of memory to hold information, and the computer goes ahead and gives that program its own little section of memory to use, just like how your teacher would assign you a desk to work on.
When the program is finished using that memory, the computer sets it free and assigns it to be used by another program, just like how you would return your desk back to the classroom when class is over. This way, all the programs can have the space they need to work and run smoothly.
But, just like how not everyone in your class needs the same sized desk, different computer programs require different amounts of memory. Some programs might only need a little bit of space, while others might require a lot. Just like how your teacher would give you a larger desk if you needed more room to work, the computer allocates more memory to certain programs based on their needs.
So, in short, memory allocation is like giving each computer program its own little desk to work on, so that they can store and access the information they need to run smoothly.