Although there is some debate, the general opinion is that one needs to be authorized to work in the US in order to perform work while in the US, even if for a foreign company. (See this and other linked questions.) If they work before being granted employment authorization, it will be considered "unauthorized employment" for immigration purposes.
Unauthorized employment does not directly affect their eligibility for asylum; nor does it affect their eligibility for Adjustment of Status to get a green card based on asylum (though it needs to be disclosed on the application). However, unauthorized employment does remove the protection against accrual of unlawful presence during a bona fide asylum claim. See USCIS Adjudicator's Field Manual chapter 40.9.2(b)(2)(B) (on page 80-82 of this PDF) as well as 9 FAM 302.11-3(B)(3). So they would accrue unlawful presence during the period their asylum was pending if they didn't have a valid I-94. Unlawful presence does not in itself prevent getting asylum or Adjustment of Status to get a green card through asylum, but if they need to leave the US before getting a green card, more than 180 days of unlawful presence will trigger an unlawful presence ban, which will need to be waived when applying for a green card later.
Taxes are a separate issue. Resident aliens for US tax purposes are subject to US tax on their worldwide income. Nonresident aliens for US tax purposes are generally subject to US tax only on their US-sourced income. If they are staying in the US for most of the year, they would pass the Substantial Presence Test and thus be resident aliens, and be subject to US tax on their worldwide income. Even if they don't pass the Substantial Presence Test (which is unlikely except in the year of arrival) and are nonresident aliens, income from work performed while they are in the US is US-sourced income, and subject to US tax. This is true no matter if they are staying in the US legally or illegally, and no matter if they are authorized to work in the US or not.
How their tax is paid depends on whether they are classified as an employee or an independent contractor. This classification depends on the facts of the employer's control over the employee's work, and is not up to the employee or employer to choose. If the person is an employee, the employer must withhold US (federal and state) income tax and FICA and other payroll taxes (including the employee half of Social Security tax, Medicare tax, and any state payroll taxes). The employer would also have to pay half of the Social Security tax, Medicare tax, and perhaps some state payroll taxes. If the employee is an independent contractor, the employee would calculate the income tax and Self-Employment Tax (consisting of both the employee and employer halves of the Social Security tax and Medicare tax) on their tax return. They would need to make quarterly estimated tax payments as they go to avoid underpayment penalties.