RPs are an extremely fragile subject that is easily made or broken. It requires alot of thought and depth into story and scenario to achieve an attractive setting that can not only bring in players; but keep them around. Generally most RPs can succeed if enough time is put into them, even something as simple as a City RP can succeed. If enough time has been put in to flesh out design, setting, and interest.
RPGs on the other hand, are much more advanced technically. One must apply time and effort into developing the necessary systems; which can vary in number/complexity depending on the subject. For example, an RPG where much of the games concept involves killing monsters, earning gold, and gaining EXP/Leveling Up; requires the applicable systems that can provide well-coded bots, gold drops, and EXP gain as well as levels and stat accolation.
When it comes to story and setting, RPGs do not need to go as deep as an RP; since many rpgs focus on the gameplay and mechanics over story.
TL:DR RPs are heavily based around the story/setting. While RPGs are heavily based on gameplay and mechanics. Both can succeed to some degree if lacking everything necessary but it's unlikely they will reach greatness.