Okay, take a deep breath. Remember this, you have NOT YET committed any crime that will send you to jail, or even into the court system as a whole. You are not yet dealing with the court system. You are dealing with the unemployment system. Despite what many people on these boards love to tell you, this is NOT the time to get an attorney and clam up.
This is the time to reach out to the unemployment fraud unit, and deal directly with them. Confess or don't confess, it doesn't matter. They will have exactly the amount you made, when you made it, how much you worked, how much you claimed on unemployment, and there is NO way you can say you didn't do it.
Likewise, they will not give a rat's patootie how nervous or scared or desperate or poor you were that caused you to decide to try, VERY STUPIDLY, to get away with this. Unemployment insurance is not a poverty program, not welfare, not based on your being low income at all. It is strictly based on your eligibility according to the laws that govern the program. If you lied and did not report wages during the weeks you worked them, and claimed your full unemployment checks for those weeks, you did it. There's no excuse and no way around it.
However, you are not the first person who ever thought of doing this. You are not the first person who thought of doing this this year, this month, this week, or even this morning. Because the average person is often going to be strongly tempted to cheat the system, the system is not overly shocked and appalled when you do it. They have checks built into their system, cross checks, matches and investigators who work with this issue related to unemployment all the time.
And they do not prosecute every person who commits fraud. If they did, the court system wouldn't have time to do anything else and the jails would be full to bursting. They are much more interested in getting it stopped, in getting their money paid back, and they are going to have some sanctions that will be placed against you, such as extra fees and charges in addition to the money you received dishonestly.
But as long as you work immediately with them, are perfectly frank and willing to pay the money back, do not dodge them, try to play hanky panky and lawyer up and be the least bit coy, they are very much unlikely to recommend you to the DA for prosecution. They'd have to do that before you were in danger of going to jail. If they did that, that would be the time for you to retain an attorney. Until then, you can work directly with the fraud unit.
You will speak with an agency representative. You do not speak with law enforcement or the D.A. or the court system in the first steps of dealing with a fraud overpayment and working out repayment. They deal with hundreds of cases a day in every state. You're no big deal to them. Just don't be a problem.
Don't avoid them, don't whine, don't lie, and don't over-promise as far as your ability to repay the money. If you're still not working, and you do not have the money at this time to repay, ask about the possibility of a waiver or deferment of the overpayment. Some states will, some won't offer this. You'd have to provide very detailed income information, and you'd better be real honest with this too.
They understand that people who are not employed may not be in position to repay immediately, but they are used to this and will work with you as long as you work with them.
The woman who was paying you under the table could very well be in some serious trouble too, because unemployment fraud was probably involved in her not paying you legally, not to mention other tax issues. But I always tell people, even if this is a strictly cash only deal, strictly under the table, they can catch you every way in the world anyhow because people will tell on you. Just for kicks, people will always tell on you if they know you're doing something like this. Actually, one out of ten claimants is supposed to be investigated for fraud at random even if no one tells on you and you have no red flags raised related to the system.
. And if you're or called in on or anonymously reported, you're investigated. If you're not doing a thing wrong, that's great, but you were still investigated. Maybe you get away with it for a while, but they usually catch you later and eventually.
Read back through some old posts on this site to get a better idea of how this works. I worked for a long time in this agency and with this particular area. You did a stupid thing, something you were not going to get away with, though you did not have the expertise in the program to know that. But you can fix it without it ruining your whole life, if you act promptly and wisely.
So don't spend a lot of time worrying about who turned you in or how you got caught. They know. They know how much and how many times. Don't waste any time right now worrying about "Could I go to jail?" The blessing is that this has been caught fairly quickly and you have the opportunity to fix it quickly and without spending any more time worrying about it. CALL THEM. TALK TO THEM. LEVEL WITH THEM. WORK WITH THEM to get this resolved. And then of course you will not ever want to be this dumb again.
Good luck to you and let us know how this goes.