What is difference between Appium and UiAutomator2 Automation Engine

I am using UiAutomator2 as Automation Name in my project.

In between i got ECONNRESET exception and Appium test did not work in that session.

While checking below link, there was recommendation to change the Automation name from UiAutomator2 to Appium.

What is the Difference between Appium and UiAutomator2? How it affects the execution?