Baby Attitude

Hello my son just turned 2 and my question is how do I Is discipline the right way like if he gets mad at something because he don't get his way he hits or none stop crying how do I handle it