Each diocese has its own procedures for the borrowing and possible incardination of international priests; as well, there are separate policies for the possible assumption of international/non-local seminarians.
More often than not, the priests are those who have either been sent by their bishop to answer a generalized plea (e.g. Poland, Nigeria, Ghana, etc. have been such cases) due to an incredible abundance of priests (i.e. “if you ever want to be a pastor within your lifetime, you may try to incardinate within the United States, Europe, etc.”), have a reason to transfer (e.g. family member end-of-life situations), or have been given some special assignment and it is deemed beneficial to incardinate). These priests are often given a trial assignment (e.g. Hospital Chaplaincy, assistant priests, etc.) for some minimum to judge their suitability. If these priests petition for incardination, they must first seek excardination from their diocese, which needs proof of a bishop willing to accept them.
Note here that it is possible for any priest of any diocese to do so, so long as a bishop is willing to accept them and they are in good standing. (For further guidance, see Canon Law, Canons 265-272)
In the case of seminarians, it’s much clearer. They are simply accepted by the bishop in virtue of the vocations director. Those whose first language is not English are [usually] required to take courses allowing them to meet the requirements of the graduate-level work involved in seminary. Again, due to the formulation of your question; after ordination they are free to incardinate/excardinate just as any other priest would be according to Canon Law. During formation, it is simply a transfer, but is also guided by Canon Law (Specifically, Canon 241 Section 3).
Of course, this presupposes that they have done their due diligence in regards to civil law.