If you work while in the US, it would be considered US income and would be subject to US taxes, including both income tax and payroll taxes (e.g. Social Security tax and Medicare tax), as well as any analogous state taxes from the state where you are located, unless exempted by a tax treaty.
If the company hires you as an employee, the company would need to withhold these income and payroll taxes (and it would pay half of the SS/Medicare taxes while you would pay the other half). Is that company set up to withhold and pay US taxes? If not, then employee is not an option.
If you are self-employed and work as an independent contractor, you would have to pay the income tax and payroll taxes yourself (SS tax and Medicare tax are included in the Self-Employment Tax), which you would calculate on your tax return, and you would need to pay estimated taxes quarterly to not have a penalty.
And I haven't touched upon the immigration aspect of this -- it would probably be considered unauthorized employment if you work outside your J1 program while in the US in J1 status.