and

True only if both operands are true.
if (digitalRead(2) == HIGH && digitalRead(3) == HIGH) { // read two switches 
  // ...
}

Execute statements inside if only if both inputs are high.
Make sure you don't mistake the boolean AND operator && (double ampersand) for the bitwise AND operator & (single ampersand). They are entirely different beasts. Similarly, do not confuse the boolean || (double pipe) operator with the bitwise OR operator | (single pipe). The bitwise not ~ (tilde) looks much different than the boolean not ! (exclamation point or "bang" as the programmers say) but you still have to be sure which one you want where. These can be used inside the condition of an if statement.