when P and N are put together, it will generate a depletion region with immobile ions. The immobile ions will generate an opposite electrical field and prevent the flow of current. That's why the PN junction has around 0.7V potential even without outside voltage. If the outside voltage is from P to N, then it needs to overcome 0.7V before it conducts. If the outside voltage is from N to P, it will never conduct until it reaches its Avalanche breakdown voltage. Hope this helps.