Cooking tofu??

So we ordered tofu in a restaurant for the first time about a week ago and it was so good! honestly just like the consistency of chicken. It was a little crunchy sorta on the outside and soft and a good consistency on the inside! It also had great flavor. When I cook it at home I cannot figure out how to get this consistency. And honestly I do not like the texture of it when I cook it at home. and cannot seem to get a good flavor on it. I am new to cooking tofu, so I was wondering how you guys cook it if you eat it? any tips would be useful!!