It depends upon whether your are talking about General Aviation flying or other kinds of flying.
For example, the accident rate for General Aviation aircraft/pilots is significantly higher than for the airlines. One reason is the skill level of the pilots and the equipment they fly.
Another reason is aircraft capabilities.
In most cases the National Transportation Safety Board always seems to assign some blame to the pilot for any accident, whether apparent or not.
For General Aviation accidents the cause, for the most part, IS pilot error. Lack of currency, of recurrent training and professionalism in the approach to aircraft operation being primary.
Airlines are extremely safe, and most emergencies easily and competently handled.