# a certain man from the city who had demons
"a certain man from the city, and this man had demons"
# who had demons
"who was controlled by demons" or "whom demons controlled"
# tombs
These are places where people put dead bodies. They may have been caves or small buildings that the man could use for shelter.