Ozone is produced by the photolysis of molecular oxygen followed by reaction of the resulting oxygen atom with another oxygen molecule.
Replace another in a molecule happens to atoms during a substitution reaction.