The change from vapour state to liquid state at a constant temperature on releasing heat (or on cooling) is called condensation.
Example — Steam (gas) at 100°C condenses to water (liquid) at 100°C on cooling (i.e. by rejecting heat).
Sublimation is the process by which a solid when heated directly changes into its vapour (gaseous state) without first changing into liquid.
Example — When camphor (solid) is heated it directly changes into its vapours (gaseous state).