Epistasis, which is nonallelic and therefore different from dominance, may be caused by the presence of homozygous recessive alleles at one gene pair, as occurs in the Bombay phenotype, or by the presence of a dominant allele at one locus that counteracts the expression of a dominant allele at the other locus.
Epistasis involves not genes so much as the proteins they code for. (So do dominant and recessive, for that matter.) Genes with epistatic relationships tend to code for proteins that work together in the same processes. An analogy might be easier to understand.