Rayna Kapec was an android built by Flint, an immortal who had wandered the Earth in various personae such as Brahms and Leonardo da Vinci, to be a companion for him.
When the Enterprise visited Holberg 917G looking for the cure to a plague that had infected the crew, Flint introduced Rayna as his ward. Captain Kirk and Rayna became attracted to each other, which at first Flint was happy about. He hoped that this would provide the final step in her creation, stirring her emotions. Later he became jealous of the relationship.
As Flint and Kirk became involved in a fight over Rayna, her new feelings and the choice between Flint and Kirk overwhelm her. Rayna, unable to handle such intense emotions, short circuited and ceased functioning