Why does my forearm and bicep hurt when I do hammer curls or pull ups?

when you work out you tear little pieces of your muscle, that's how you build muscle. You get sore because of these little tears.