This is a common expression we use as Muslims, and can be interpreted in different ways.
Initially, ما شاءَ اللهُ is three words, ma (anything/what/whatever), shaa` (will/want/desire/request) and Allah.
When we utter this, we are expressing God's power and will over us.
It means anything that Almighty God wills happens, and whatever God wants will happen. When we say it, we are confirming that it is God's will and what He wants, and not our will, or what people want, even if they dont want it, or hate it, if it is the will of God, it will happen.
It is highly recommended to say this dhikr, especially beginning the day by saying bismillah, ma shaa Allah.
The custom is also that this statement is said to repel evil eye and envy. So, when you see something/someone nice, to repel evil eye and envy, you say ma shaa Allah.
And Allah knows best.