So, if you just use whatever art or music you find on the internet, that's considered stealing if you don't have permission. Also, then anyone whose art you stole could technically force you to stop working on your project and sue you in court (unlikely to actually happen, but technically possible). Also, it's impolite to take someone's hard work without asking them, and let's all just be nice.
It's not hard to know whether an artist wants you to be able to use their hard work for yourself- especially in pixel art like you're probably dealing with, usually people will write the rules right on the piece of art.
Sometimes (especially here) you'll see licenses on art. It might look something like CC-BY-SA. The CC means "Creative Commons", which is a type of license, then the others roughly mean "if you use this, you have the give credit to the artist" and "if you alter this, the new thing you create also has to give credit to the original artist." If you see a license on art, it's usually easy to look it up and figure it out, but if you're confused I bet people here would be willing to help you understand the license, just ask : )
The other things you'll see on a lot of pixel art is saying something about credit. Like "give credit" or "credit please". These are like the CC-BY license, because what it means is the artist wants you to let everyone know they created the art you're using. In the case of a game you're making, a readme file in the folder with credits would work temporarily, and then actual credits at the end ought to include them.
An artist might also write "no credit needed", which means you don't have to say who made the art. However it's very rude, at the least, to say you did it yourself because that's lying obviously. And nobody lies on the internet so don't be the first (lol).
The thing about writing "please give credit" or something is that unlike CC licenses, that has no legal standing. Perhaps you could argue in court that they intended to allow others to use their art, but if they changed their mind and wanted you to stop using their art, you'd probably have to, so it's better if someone has put an actual license on their art.
Finally, you'll also find a lot of art that has no rules written on it. This is harder if you really want to use it, but there are some things you can do. If you found the art somewhere where you can ask the artist to use it, start by asking them. They're allow to say no though, because they've probably spent many, many hours learning to create this art and then more hours making the particular thing, so if you just want to use it for free, without having done all that work, why should they let you? But maybe they're really nice and they will just let you, so ask, and follow any rules they might give you (like 'give credit' or 'don't use this in a violent game' or whatever they want.)
If you don't know who the artist is, try looking for them. Use Google for a reverse image search, which can show you who was the first person to put the image on the internet- that will usually be the artist, so maybe you can ask them. If you can't find the original artist, or if they aren't around anymore, or if they won't answer you, you're out of luck. Please don't use their hard work anyway just because you want to. There are a lot of other options- use art from someone else who will let you, or learn yourself.
Finally, a few other things you should know about on this topic- there is lots of art where the artist has explicitly given permission for anyone to use it. Try
opengameart.org, it's a whole website of the stuff. It's awesome, even if a lot of it is just okay.
Another option is buying the art from an artist. Websites like
gamedevmarket.net allow artists to sell assets like tilesets, characters, etc. for pretty inexpensive prices. For example, maybe instead of stealing Nintendo's art, there's a brilliant pixel artist who I think uses the Zelda Classic engine, and she's released an entire overworld tileset for just $10. If you can save up to spend a bit on that, not only would you be following the law, not stealing from Nintendo, and immune from any cease and desist notes from them, but you'd also be supporting an artist.
LinkAnd one final note that's not about what's legal to do, but just from me personally as an artist. I learned just about everything I know about pixel art from stealing graphics from Nintendo's games and adding more to make my areas customized. It started with basic edits to Zelda the Minish Cap's tilesets, like making a door wider, or combining two things poorly, then I was adding my own little touches that didn't look that great, and now I'm making all my own graphics. I've still got a long way to go, but I did start learning by stealing. Many great artists admit they've stolen ideas, although before digital art this meant they'd see something they liked and reproduce it as best they could, which is a great way to learn. Try to reproduce Nintendo's art- maybe have a graphic open on one side of the screen and try to re-draw it on the other side. Make a few changes. That's how we learn. But please don't just take some poor artists work because you want to.
Oh, and sorry, "matter" and "better" don't rhyme in English XD
Let me know if anything I said wasn't clear.