A ramjet uses the open Brayton cycle. In the above diagram a 2D supersonic intake is shown downstream of which is a divergent subsonic diffuser.
Ramjets are inefficient at subsonic speeds and their efficiency improves at supersonic speeds.
At hypersonic speeds the compression and dissociation processes make full diffusion unattractive and supersonic combustion is being researched. Scramjet slow the air down to low supersonic speeds and then burn high flame velocity fuels such as hydrogen or methane to try to get net thrust.