If and if-else statements in programming allow for conditional execution of code. If statements execute code if a condition is true, while if-else statements execute one block of code if the condition is true and another block if the condition is false. Examples are provided of using if to print a message if a variable is less than 10, and using if-else to determine and print whether an input number is even or odd.