First, neither is inherently "better" than the other, it just depends on what you're trying to attain.
MP3 is lossy audio compression, which means bits of audio information deemed least susceptible to the human ear are discarded during the encoding process, allowing for smaller file sizes (convenience) in exchange for permanent loss of audio data - amounts varying depending on what encoding options are set.
FLAC is lossless audio compression, meaning it doesn't discard audio information during encoding and maintains 100% CD/source quality. This usually means significantly larger file sizes, but would be ideal if you intended to actually back up a CD or CD collection (as opposed to simply ripping songs to your computer for convenient listening), as it's an exact digital copy audio-wise.
Almost nobody can hear the difference between, I think, 256 kbps or higher mp3s and lossless audio formats like FLAC or APE. There's also other technical and practical pros and cons to each (depending on one's mere preference and/or goals) but hopefully this helps explain it a little.