Was Japan “opened up to the west

How and why was Japan “opened up to the west: and what impact did this have on Japan?