https://en.wikipedia.org/wiki/Traffic_collision_avoidance_sy...
Well airplane autopilots can avoid obstacles... about time after 100 years of development. (The first aircraft autopilot was developed by Sperry Corporation in 1912. The autopilot connected a gyroscopic heading indicator and attitude indicator to hydraulically operated elevators and rudder.)
Technically speaking yes. But the obstacle does need to have a working TCAS transponder! An A380 won't be able to detect or avoid a military jet for example because they tend to not be too forthcoming about their locations. Some birds, most notably the Ruppell's griffon vulture, can fly into airliner airspace topping out at 37,000 ft.
However, by general agreement, only aircraft on IFR flight plans are allowed into the airliner zone and therefore pretty much all the obstacles (not military jets or birds) do have TCAS or ATC clearance.
Lastly while some aircraft do have TCAS integrated autopilot it is uncommon. Some airlines are still operating aircraft 40 years old.
The plane flies on its own for hours or at least 747s do.