Um, it's an option right there in the menu of event commands.
I believe that the button is labeled "Conditional Branch."
Basically, it's an If...Then...Else statement. You indicate what condition you are testing, and then it creates two branches, one for yes and one for no. Very simple, and very, very basic as far as programming concepts go.