Apple first implemented picture-in-picture on the iPad way back in iOS 9, and users have been clamoring for it to come to the iPhone ever since. With iOS 14, Apple is finally giving us our wish. PIP is coming to iPhone, and it works almost exactly like it does on iPad.
Apps need to incorporate support for the feature, though. During the early beta days, you can use the TV app or any video that streams in Safari, but popular apps like Netflix and YouTube have not yet implemented PIP support. That will likely change by the time iOS 14 is released in the fall.