Teleplay by is a credit when the credit is split between more than one person. For instance, on the last episode of "The Inside," I got "story by" credit and Jane Espenson got "written by." If one writer came up with the story, or wrote the outline, and another writer expanded it into the screenplay, it would be broken up this way.
These things are often not as definitive as all that, though. In other words, a staff might break an episode as a group. The show runner may be the driving force behind the story break, but generally she or he won't take a "story by" credit. Generally it's just credited to the writer "whose episode that is."
Another example would be if a non staff person came in and pitched an idea -- like Bob Hamer, our FBI consultant on "The Inside" did for the episode "Gem" -- and if I buy a pitch, I might want to assign it to a writer on my staff. We might take a big or a small portion of that pitch, or even end up with a script that doesn't resemble the pitch, but the freelancer would get a "story by" credit all the same.