When a single strand of DNA (ATCATG) matches a strand of RNA (UAGUAC), the two strands are "complementary" and will stick to each other. However, if the bases aren't complementary, they won't fit together. An A won't pair with another A or with a C or a G. Even a single base that doesn't match its partner (like a C and an A as shown in the adjacent diagram) could keep one single strand from sticking to another single strand.