Individual people from American or European countries have joined ISIS over time.
Such a person may decide to returns home.
If it was never recognized that the person had the intention to join ISIS, he/she is basically just a person returning from traveling.
If the person is known to be an ISIS fighter, he will be detained at arrival and probably indicted for some felony.
If it is known the person was member of ISIS, but nothing else is known, and there is no indication that he was an active fighter: What happens in this case?
There is a good example for the third case happening in Germany. A teenage girl without any relation to Islam was in a state of searching for meaning of live as part of normal being a teenager. She was around 15 years old, and somehow, more or less randomly, came in contact with radical Islam culture.
She then decided to travel to join ISIS in some region where it was active.
She basically became housewife, in a relationship with an active ISIS fighter.
After some time, she realized that it all was not a good idea. Around 2 years after joining ISIS, she decided to return to her family. She began to search for somebody to smuggle her home, and succeeded after multiple attempts. There were no reasons to think she had any relations to ISIS - only her father and the smuggler helping her knew about it.
I'm wondering how a member of ISIS returning from any relation with ISIS would be treated when it becomes known, and it is plausible he/she did not engage in any kind of illegal activity during the time. She was still teenager when returning home, but that is not central to my question, except that it probably helped to reduce suspicions.
A documentary about the example case in Germany, in English language: My Daughter and the Caliphate | DW Documentary