Is there a way to keep my iPhone from receiving calls/texts/alerts while listening to music?
Coming in iOS 6, you'll have the option to set "Do Not Disturb" mode in the device's Settings.  DND allows you to block out a time window where calls and alerts will be silenced.

You can optionally configure it to allow calls from "favorites" or repeated calls to still come through.