Obviously legality varies by country.
Just pretending to be underage and talking about sex is not illegal.
It may be illegal, however, if the people you're talking to are too young.
Depending on how young you "are" some men might want to send you CP, which is illegal for you to save or have in your cache.
And of course sending CP yourself is illegal as well.