The Pentax K-50 DSLR is what's replacing the Pentax K-30, a good quality, good value DSLR. It's a mid-level camera, designed to be easy enough for a beginner but capable enough for the advanced user.
The differences between the K-50 and the K-30 are more on the outside than the inside. There are very, very few internal differences between the two cameras, and nothing significant enough to even mention. They are the same on the inside. Same sensor, same software, same auto-focus--same everything. There are only a couple of very tiny internal differences.
The external differences are more significant. The cameras have a slightly different design--they look similar at first glance, but a closer inspection reveals some differences. I couldn't tell you which design is better, but they're similar enough that it probably doesn't matter. The K-50 is available in every color under the sun, while the K-30 only has a few available colors.
I would think that if you are considering the Pentax K-50, you would want to look closely at the K-30 because you are getting the same camera for less money. I would only choose the K-50 over the K-30 if there is some color you just have to have that isn't available for the other camera. Otherwise, the K-30 is the better choice just because you can find it for less.