To 'tell' something is to give a piece of information or an instruction.
I will tell you how to...
I told you to walk over there.
To 'say' is to either say exactly that or to paraphrase it. If that doesn't make sense, saying what someone 'said' in the past is almost the same as quoting the,
I said, "walk over there."
I said that you should walk over there.
"I said to him not to do that" is technically correct, but it's better as "I said to him that he should not do that."