How does WordPress access theme and plugin files through its editor?

How does WordPress access theme and plugin files through its editor?