The episode begins with a couple of settlers who realise something is wrong, one of the settlers tells the other to keep smiling which doesn't work and eventually both of them are killed by a mysterious plague of flies,
The Doctor takes Bill Potts on her first journey in the TARDIS. They visit a planet that has been terraformed and ready for settlers but there are no settlers on the planet, its empty. All that there is are Robots that have faces that communicate in Emojis. The Doctor takes Bill back to the TARDIS but Bill doesn't stay around and returns to join the Doctor.
The Doctor discovers that the city is built round the settlers space ship and that the settlers have not woken up yet. When the settlers start waking up, the Doctor has to prevent the newly awoken from being killed like the others.
The Doctor discovers that the Robots are unable to comprehend when the settlers were unhappy and was killing them. The Doctor resolves the issue by re-booting the computers and resetting the Emojibots so they don't attack the humans when they are sad.