"That's okay" is a polite way of saying don't do something. It's a polite request. Like when someone wants to bring you something you don't need, you can use it.
"It's okay" means "I don't mind you did it or said something". Like after someone apologieses, you say "it's ok".