Two proton beams going in the same direction repel each other, as they are like charges and we know that like charges repel each other.
When a charge is in motion then a magnetic field is associated with it. Two wires carrying currents in the same direction produce their fields (acting on each other) in opposite directions so the resulting magnetic force acting on them is attractive. Due to the magnetic force, these two wires attract each other.
But when a charge is at rest then only an electric field is associated with it and no magnetic fiels is produced by it. So at rest, it repels a like charge by exerting a electric force on it.
Charge in motion can produce both electric field and magnetic field.
The attractive force between two current carrying wires is due to the magnetic field and repulsive force is due to the electric field.