when p type and n type semiconductor are joined or connected it is called p-n junction...in p-n junction the holes from p-type diffuse to n-type and vice versa....an finally a depletion layer is formed at the junction..the junction has small p.d. called barier potential..but due to small length of depletion layer the field is very high.