The hydromagnetic Kelvin–Helmholtz instability is relevant in many complex situations in astrophysical and laboratory plasmas. Many cases of interest are very complicated, since they involve the combined role of velocity shear, of density and magnetic field stratification, and of various geometries in compressible plasmas. In the present work we continue investigating the influence of various physical and geometrical parameters of the plasma on the Kelvin–Helmholtz modes. We use the general dispersion relation for the ideal compressible MHD modes localized near a velocity discontinuity between two uniform plasmas. We study analytically the existence and properties of the modes and their stability, for a velocity jump combined with a density jump, and for any relative orientation of B, u and k (B is continuous). Stability is analysed by means of a general procedure that allows discussion of any configuration and all kinds of perturbations. The boundaries between modes of different kinds are discussed. In contrast to the case of uniform density, for a density jump there are no monotonically unstable modes, only overstabilities. The unstable modes belong to two types. Those with the largest growth rates tend to monotonically unstable modes in the limit of uniform density, and are related to the torsional Alfvén mode. The other overstable modes have no analogue among the purely incompressible modes, and occur in a range of U that is stable in the incompressible limit. We derive bounds for the growth rate of the instability. The present results may serve as a guide to interpret results in more complicated and realistic situations as those occurring in laboratory and natural plasmas.