Politico and other media organizations are speculating about the legal status of Melania Trump when she first came to the U.S. Working in the U.S. without authorization is a civil violation. Anyone who misrepresents her or himself to the U.S. government is subject to a criminal complaint. Melania may have incurred both vulnerabilities in the mid 1990s.
The official version (what she and the campaign said) was that she arrived first from Slovenia in 1996, returned regularly to Slovenia to renew her right to be in the U.S., became a legal permanent resident (LPR, Green Card) in 2001, and a citizen in 2001.
For her to work in the U.S. before gaining her LPR status in 2001, she would have had to have a visa allowing her to work, for instance as a model. Created by the Immigration Act of 1990, there is a complex system of temporary immigration statutes which enable foreigners to work for limited periods of time, and depending on the type of visa only at a designated occupation and employer.
A temporary work visa that Melania would have obtained would most likely have been a H-1B, which is available for skilled workers. According to Politico, she has said she came in 1996, but modeling photos of her were taken in the U.S. in 1995. Per Politico, “The nude photos were taken in New York in 1995 for the January 1996 issue of France’s now-defunct Max Magazine, according to the tabloid.”
The H-1B visa program (which includes one category for models) is for a minimum of three years. This would preclude Melania having to return to Slovenia repeatedly due to visa expiration and re-applying.
Politico writes: “In a January  profile in Harper’s Bazaar, Trump said she would return home from New York to renew her visa every few months. “It never crossed my mind to stay here without papers. That is just the person you are,” she said. “You follow the rules. You follow the law. Every few months you need to fly back to Europe and stamp your visa. After a few visas, I applied for a green card and got it in 2001.”
A straightforward interpretation is that she did not initially have a visa allowing her to work. Apparently at the time a visa was not needed then for non-working stays in the U.S. for under 90 days, within any 180 day window. This means she would have to exit the U.S. often; wait for 90 days, and then return.