In this thesis chemical and epitaxial degrees of freedom are used to manipulate charge and spin ordering phenomena in two families of transition metal oxides, while taking advantage of state-of-the-art resonant x-ray scattering (RXS) methods to characterize their microscopic origin in a comprehensive manner. First, the relationship of charge density wave order to both magnetism and the "pseudogap" phenomenon is systematically examined as a function of charge-carrier doping and isovalent chemical substitution in single crystals of a copper oxide high-temperature superconductor. Then, in copper oxide thin films, an unusual three-dimensionally long-range-ordered charge density wave state is discovered, which persists to much higher temperatures than charge-ordered states in other high-temperature superconductors. By combining crystallographic and spectroscopic measurements, the origin of this phenomenon is traced to the epitaxial relationship with the underlying substrate. This discovery opens new perspectives for the investigation of charge order and its influence on the electronic properties of the cuprates. In a separate set of RXS experiments on superlattices with alternating nickel and dysprosium oxides, several temperature- and magnetic-field-induced magnetic phase transitions are discovered. These observations are explained in a model based on transfer of magnetic order and magneto-crystalline anisotropy between the Ni and Dy subsystems, thus establishing a novel model system for the interplay between transition-metal and rare-earth magnetism.