Okay. Well I'm thinking of a murderer's fantasies as an example. If somebody fantasizes about murdering and how they are going to do it, I think that is a sin. But, not half as much of a sin as actually carrrying out the fantasy, for obvious reasons.
I think that if somebody has fantasies about something that is illegal or morally wrong then they should seek advice.
No nor is carrying out a fantasy a sin unless it involves a criminal act or the breaking of the ten commandments. if u are a Christian that is, not sure if other religions have such a thing as sin as such.
If I was fantasising about having sexual relations with someone other than my partner then I would consider that to be cheating to a certain degree. I would definately feel that I had betrayed my partner to some extent.