Wear and tear and warranty
Many things on bicycles are consumable and anything that moves or rubs is going to have to be replaced, it's just a matter of when.
It's unusual for a cassette to wear out completely within a year although if it's been ridden on a stretched chain or without regular cleaning and lubing it'll wear out much faster.
In my experience chains are normally the first things to wear out, presumably because they almost constantly in motion and rubbing against the cogs while you ride plus picking up all kinds of stuff that flies off of the wheels. I normally replace my chains every year regardless of the state that they are in simply because of the low cost of a replacement chain and the relatively high amount of damage that running a worn chain can cause.
You can tell if the cassette (or the  chainrings) need replacing by checking the teeth. If the teeth looked ramped you should switch out the part. See Image:

If the teeth don't look worn but are black with dirt you can clean them with a de-greaser you may find it easier to clean the cassette if you remove it although this requires a cassette removal tool otherwise you can leave it on and clean it with a brush and ordinary dish soap, just rinse afterwards, dry it and remember to lube the inside of the chain again after cleaning it being careful not to overdo it as that will just cause muck and grit to stick to it while riding. Do not use WD-40!
To check the wear on your brake pads look at them from the side and check for grooves. New brake pads come with groves which allow water to escape from under them much like the tread on a tyre. If your brake pad has no visible groves on the face that touches the rim, they should be replaced.