Most western countries have a minimum age of criminal responsibility. In the UK it's 10, In the US it varies by state, but in federal cases it is 11. I don't know the age limit in Thailand.
Children under that age are presumed to not fully understand the difference between right and wrong.
Juvenile courts deal with juveniles who are above the minimum age.