Imagine you and your friends are playing on a playground, and there are different activities to do: swinging on the swings, sliding down the slide, and climbing on the jungle gym.
Concurrency is like taking turns doing these activities one by one. First, you swing on the swings for a little while, then you go down the slide, and then you climb on the jungle gym. You're doing each activity separately, and you give your attention to one activity at a time.
Parallelism is like playing with your friends, and each of you chooses a different activity to do at the same time. One friend swings on the swings, another friend slides down the slide, and a third friend climbs on the jungle gym. Each of you is doing a different activity simultaneously, and it's like the playground is being used by multiple people all at once.
So, to summarize with the playground example:
Concurrency is like taking turns doing different activities one after the other.
Parallelism is like playing with friends, where each person is doing a different activity at the same time.
Just like playing on a playground can be done by taking turns or playing simultaneously with friends, computer programs can use concurrency or parallelism to do their work in different ways too.
Reference
- https://devopedia.org/concurrency-vs-parallelism
- https://www.google.com/amp/s/www.geeksforgeeks.org/difference-between-concurrency-and-parallelism/amp/
- https://medium.com/@itIsMadhavan/concurrency-vs-parallelism-a-brief-review-b337c8dac350