Carbs or protein ?

Rh

I just got a gym membership and my trainer advised to alternate my routine with cardio and weights. Other than that, I have no idea about muscle recovery ....

What are the rules for eating carbs or protein with exercise?