The plot of the story is fairly straight-forward. What is potentially confusing about the narrative is its resistance to predictability. From beginning to end, the story seems to move in ways that are unexpected though the events are far from "fantastic" and remain rather banal.
The story follows a foreign intellectual who is visiting a penal colony island on his travels. This character is known as "the traveler" in the story. He is invited to watch an execution that is to be carried out by "the officer" and a soldier. The man to be killed is known as the "condemned man" (he is a guard at the penal colony but lapsed in his duties and so is to be put to death).
There is a machine that is to be used in the execution. This machine, the officer explains to the traveler, is designed to "write" a message on the body of the condemned man by essentially etching it into his body over a period of twelve hours. When the process is finished the man dies and is slid into a pit.
After explaining the machine, the officer places the condemned man onto the machine. He then talks with the traveler about why the traveler has been invited to witness the execution. There is a discussion here about changes that are to be made on the penal colony regarding this mode of execution. The traveler tells the officer that he is against this form of punishment, for several reasons.
The officer then removes the condemned man from the machine, recalibrates the device, and puts himself in.
The officer, having failed to procure an ally, abruptly releases the prisoner and takes his place on the bed after readjusting the machine to inscribe the sentence "BE JUST" on his body.
The machine is turned on and the officer is killed by the device.
The traveler then goes to town, visits the grave of the officers former mentor - the former commandant of the penal colony - and then boards a ferry that will take him to his boat, which will bear him away from the island the next day.
Yes it is a very difficult story to grasp. The story follows a civilized western Enlightened man who observes culture as a scientist would a microbe. He observes without making any moral judgements. He does not become part of the action. He does waver, asking himself if he should act, but in the end his objectivity wins out and he remains merely an observer. He is imprisoned in the ideals of the enlightenment. Lack of morality or ethics impinges on his ability to act. His lack of any moral or ethical code allows him to save his life (he is the only character to escape the island), but at the cost any ethical/moral life. Think of an observer who watches the Nazis without acting, or a news reporter who observes terrible events and claims objectivitity and only doing his job.