Please you the Question tags to state the name and full version number of the Story Format you are using, as answers can vary based on that information.
Harlowe:
(if: $var1 is "A" and $var2 is "B")[
This text will only appear if both conditions are true!
]
(if: $var1 is "A" or $var1 is "B")[
This text will appear if at least one of the conditions is true!
]
SugarCube:
<<if $var1 is "A" and $var2 is "B">>
This text will only appear if both conditions are true!
<</if>>
<<if $var1 is "A" or $var1 is "B">>
This text will appear if at least one of the conditions is true!
<</if>>
Snowman:
<% if ($var1 is "A" && $var2 is "B") { %>
This text will only appear if both conditions are true!
<% } %>
<% if ($var1 is "A" || $var1 is "B") { %>
This text will appear if at least one of the conditions is true!
<% } %>