Srcset, sizes & media in HTML vs media queries in CSS

Are there any significant differences between using srcset, sizes & media to handle my responsive image problems and using media queries in CSS?

Am I supposed to only use one method or should I be using both at the same time?