Can you get a virus through MP3 files?

Yes, but there have not been any reported mp3 viruses for PCs, Macs, or Linux computers. But there has been one confirmed mp3 virus that attacks ipods.

Somebody thought that files must be executable to infect a machine, but this is not accurate in my opinion. A cleverly crafted data file can take advantage of flaws in existing software to cause unexpected behavior, which may include adding, replacing or deleting files. There have been many reported vulnerabilities reported (and fixed) with the code in web browsers that displays images (jpeg, gif, etc) some of which have allowed execution of arbitrary code. There is no reason that similar vulnerabilities might exist in mp3 player software, as the link above demonstrates.]

Keeping your computer up to date with operating system fixes should help minimize the risk, which is already fairly low, as would not downloading mp3 files from unknown sources. These kind of attacks are also very specific to a particular operating system and software. Virus scanners generally don't even look in image, audio or video files, because there have been few or no examples of this sort of virus.