Were they granted asylum, then waiting for a green card? If so, they are not illegal. Deportation requires a hearing.
They need not be refugees either. But Trump's new laws ban the "immigration" of Muslims. This means, a freeze on green-card approvals based on religion. If you don't have a green-card, you have to leave this country. Not all deportations are carried out by ICE.
P.S: Green-card applications could be active for over 8 years with no-fault. The system is just that screwed up.
What he actually said was: temporarily banning muslims from certain countries known to harbor terrorists.
Not sure why you saw "law". Only congress can make laws; not the president. Besides, the 1 st amendment is in his way. There is some precident for banning immigrants from certain countries. Chinese immigration was banned for a time, over 100 years ago.
[1]: https://www.donaldjtrump.com/press-releases/donald-j.-trump-...
[2]: http://www.nytimes.com/interactive/2016/07/22/us/politics/tr...