If you’re just starting out, you should try to get more comfortable doing research. Google is every programmer’s best friend.
You could start out by googling “Processing if statement” or “Java if statement”. Since Processing is built on top of Java, most Java tutorials will also apply to Processing.
Shameless self-promotion: here is a tutorial on if statements in Processing: