First Calculate "True High" which is the Higher of Todays High or Yesterdays Close
Then Calculate "True Low" which is the Lower of Todays Low or Yesterdays Close
Then calculate "True Range" which is simply "True High" - "True Low" of that day.
ATR is the Average of this "True Range" over a number of days.
No example needed I think.