The word organic stands for something related to the living world. So, organic compounds are the compounds obtained from living organisms. These organic compounds are studied under a separate branch of chemistry known as organic chemistry. All organic compounds must have elements carbon and hydrogen. As hydrocarbons are compounds containing carbon and hydrogen, they fall under the category of organic compounds.
Along with carbon and hydrogen, organic compounds can have elements nitrogen, oxygen, halogens, sulphur, phosphorus etc.