Potiphar was the chief steward of the Pharoah who bought Joseph from the Ishmaelites (Genesis 39:1). Joseph got along well with Potiphar and was assigned to his household. The Lord blessed the Egyptians house for Joseph's sake, and Potiphar left everything he owned in Joseph's charge.
Potiphar's wife took notice of Joseph's good looks and asked him to "lie with me." Joseph refused and ran out of the house, leaving his cloak in her hands. She then told her husband that Joseph tried to rape her. Potiphar had Joseph thrown in prison, but he did not have him executed, as the fit punishment would be for that crime.
This showed that the Lord was with Joseph through the rough times (Genesis 38:1-23). Potiphar means "dedicated to Ra."