I need to know the Halacha: a married woman had an affair with another man and brought a child in to the world from that man, is that child allowed to marry a Levi?
The offspring of the union of a married woman and a Jewish man other than her husband produces what is known in halacha as a “mamzer”, an illegitimate child. This child may in fact not marry any regular Jew, whether a Kohen, Levi or Yisrael.
While the mamzer can not join the general marriage pool, there are some he could marry. A male mamzer and a female mamzer could marry each other. A mamzer could also marry a convert. A mamzer can even marry the offspring of two converts, even though that person was born Jewish, See Kiddushin 75a.