A substance is a thing, and an attribute is something that tells us what the thing is like. Here’s an account of the Nyaya view of attributes, from Satischandra Chatterjee’s book The Nyaya Theory of Knowledge (Page 176-177):
"An attribute (guna) is defined as that which exists in a substance and has no quality or activity in it. A substance exists by itself and is the constituent (samavayi) cause of things. An attribute depends for its existence on some substance and is never constitutive of things. It is a non-constituent (asamavayi) cause of things in so far as it determines their nature and character, but not their existence. All attributes must be owned by substances. So there cannot be an attribute of attributes. An attribute is itself attributeless (nirguna). An attribute is a static property of things. It hangs on the thing as something passive and inactive (niskriya). So it is different from both substance and action. There are altogether twenty-four kinds of attributes. These are: colour (rupa), taste (rasa), smell (gandha), touch (sparsa), sound (sabda), number (sankhya), magnitude (parimana), differentia (prthaktva), conjunction (samyoga), disjunction (vibhaga), remoteness (paratva), nearness (aparatva), fluidity (dravatva), viscidity (sneha), knowledge (buddhi), pleasure (sukha), pain (duhkha), desire (iccha), aversion (dvesa), effort (prayatna), heaviness (gurutva), merit (dharma), demerit (adharma) and faculty (samskara)."Not all attributes can be identified through sense perception—some are imperceptible to sense perception and there are those that can be perceived only through internal perception, which is due to the internal sense of manas.