New player here - how do I raise animals?

How/what do I feed them, and how much?

One Hay or one grass a day. If you let them out, they'll eat one grass "stalk" if possible; if you don't, and if you have Hay loaded on the tray (a sort of wooden row at the top of the Barn/Coup), they'll eat that instead (and be a bit less happy, but that's not a huge deal - better than not feeding them by far).

How do I let them out, and how do I bring them back in to keep them from being eaten by wolves?

Open the Barn/Coop hatch (the large garage-like "door") to let them out. Animals won't get "eaten by wolves" - animals can't die in Stardew whatsoever. Leaving the door open overnight or in rainy/Winter weather will make them unhappy, though, so remember to shut the door at 6 pm (they'll find their way back to the building by then) and don't open it in bad weather.

Is it better to have them produce lots of stuff, or sell them when they reach peak "hearts"?

Selling animals isn't worth the effort you put into raising them - it's what you do if you don't want to bother raising them anymore and got what you need out of them. It's best just to keep them producing, enhancing their produce into Artisan Goods such as Cheese or Mayonnaise (exception being Golden Truffles, which you should never refine), and selling that.

For maximum efficiency, you'd never sell animals - although, if you want to be 100% time-per-gold efficient, you'd never buy animals in the first place, as they take time to maintain. Still, it's an interesting area of the game that you should dabble in nonetheless, even if you decide you don't want to be bothered to care for them and sell them.

/r/StardewValley Thread