I am reading about Castle Windsor and about MEF.
I am trying to understand what are the differences between them? (do they have the same purpose?)
If someone can give a simple explanation what are the differences it will be great.
Somewhat different things.
MEF is about discovering dll dynamically for "plug in" kind of functionality.
https://www.codeproject.com/Articles/188054/An-Introduction-to-Managed-Extensibility-Framework
You would not usually use this for dependency injection, although it's theoretically possible.
Castle Windsor is about dependency injection which is in turn about decoupling your code. Common scenario where you'd want DI is to provide mocks for automated testing so you can switch out a (fast and predictable) mock in memory set of classes for a (slow and likely changing) database layer .
Both are useful, just in different ways.