We have no indication that the Dursleys knew that Mrs. Figg was in any way associated with the Wizarding community, but it's most sensible to assume they did not. As you point out, it would be entirely out of character for the Dursleys to willing place Harry in the care of anyone magical, no matter how remotely, especially when they were explicitly trying to "stamp [the magic] out" of him:
"I'm not having one in the house, Petunia! Didn't we swear when we took him in we'd stamp out that dangerous nonsense?"
Harry Potter and the Philosopher's Stone Chapter 3: "The Letters from No One"
Moreover, when we actually get to speak with her Mrs. Figg is quite clear that Harry being miserable was considered a bonus by the Dursleys, and is at least part of why he was allowed to spend time with her:
I'm sorry I gave you such a miserable time, but the Dursleys would never have let you come if they’d thought you enjoyed it.
Harry Potter and the Order of the Phoenix Chapter 2: "A Peck of Owls"
Similarly, it seems unlikely that Dumbledore told them about her; he convinced the Dursleys to take Harry in mainly by appealing to familial guilt, but it's clear they had no qualms about ignoring his instructions when it suited them. If Dumbledore had told them "if you ever need a quiet weekend, give the boy to the weird lady a few streets down with all the cats," it seems most likely that they'd have done exactly the opposite, if for no other reason than to avoid exposing him to anything even slightly magical.
Remarkable as it may seem, there was once a time when people talked to their neighbours1; since she lived so close to Privet Drive, it doesn't seem entirely unreasonable for the Dursleys to know her socially. How they first met, however, is unknown to my knowledge.
1 And I say this as someone who has met maybe two of my many neighbours; no judgement, trust me