Your question is a little vague unfortunately. I suspect that you already know that, and that’s why you’re asking.
You need to do some basic reading. The best place is a fairly small section in Chapter 3., ILE Advanced Concepts, of the ILE Concepts manual. The section topic is ‘Data Management Scoping Rules’. Download the .PDF and read that section.
That small topic says about all you need to know to make sense of what you see. Most of the rest is covered in Chapter 11., Data Management Scoping.
After reading the first topic, you might know more about some exact questions that can ask.