NASA X-ray observatory reveals how black holes swallow and spit out matter