What if a person is unable to understand what he is doing or feeling and in order to figure it out if he does that thing (which is a sin), but he did not have that intention (the intention to tale pleasure from it or sin). Will he be forgiven? This might sound weird, but this is a question I really need to ask.
My interpretation of your question is this: What is the ruling on the deeds we have done while we do not know what the ruling is and then find out what the sin was?
Answer: It is obligatory on every Muslim to know the haram and halal of Islam as much as his daily needs and to always research the rules of his religion. But sometimes this problem can usually occur in early adolescence. That is, a Muslim commits an act that he did not know was forbidden and is considered a sin. Such a person should ask for forgiveness and seek forgiveness and try to make up for what has been lost. God knows the intentions and the hearts, and He will surely forgive such a person.
A person who has committed a sin without knowing that it is a sin, although he has not committed a sin that prevents him from prosperity and incites God's wrath against him, is likely to warn people about the harmful consequences of a sin. Some effects of the situation may cause him and others to realize that they should try to increase their knowledge so that the subconscious does not commit disgusting behavior. Of course, these works do not have the intensity and power that will cause his eternal losses, but will remain as a warning.
I'm not certain, but I presume that: it is related to diverse conditions/situations ... Meanwhile, I've figured out the queries precisely, I think:
the sin which was committed on confusion (if the intellect didn't really understand) but he/she must compensate the issue which has been missed by his/her act... (of course his introduction act --such as eating something which made him to be so, can be haram that ... and it depends upon diverse factors.)