In a sense, there are two kinds of priests.
Diocesan priests are supervised by a particular diocese. The diocese assigns them to a particular duty, which can be parish work, teaching (e.g., in a high school), social work, diocesan administration, etc. If they are not assigned to work in a parish during the week, they will still be assigned to reside in a particular parish, and assist that parish on the weekend.
Depending on the bishop, there may be more or less (name removed by moderator)ut from the priest as to their preferred assignment. An assignment may be for a fixed number of years, or it may be for an indefinite time frame. On occasion, a priest may request a transfer to another diocese, and the two bishops will come to an agreement to effect the transfer.
Order priests belong to a particular religious order, like the Jesuits, Franciscans, Benedictines, Augustinians, Claretians, Redemptorists, etc. If you see letters after the priest’s name, that indicates the name of the order, in Latin. (S.J., O.S.F., O.S.B., O.S.A., C.M.F., C. Ss. R) The religious order assigns the priest anywhere in the world, to help fulfill the particular mission of the order. For example, some orders run high schools, universities or hospitals that are independant of the diocese in which they are located.
Sometimes a religious order will agree to run a diocesan parish, perhaps an inner-city parish that the diocese would othwise close, or perhaps a parish that contains a shrine that is relevant to the order. The order then assigns priests to staff that parish, without (name removed by moderator)ut from the diocese.
Of course, there are exceptions to the rule.
For example, the Archdiocese of Philadelphia has “adopted” a parish in Puerto Rico, and will assign Philadelphia priests to staff it. The experience they gain will allow them to better serve Hispanics in the Archdiocese of Philadelphia upon their return.