How does the engine react to touch event?

How does the engine react to touch event?
Or what’s the processing order of touch event?
which part first react to touch event?