Mkennedy's answer is right at identifying that line as the international date line and explaining how it works. However, I'd like to add on the main weird points of the line. North to south:
In the Bering sea, the line bends eastward to include all Russia in the same side, and then it bends westward to include the Aleutian islands on the same side as Alaska and the rest of the United States. Interestingly, until the Alaska purchase in 1867, the line was located a lot more to the east to give Alaska the same date than the rest of Russia. Thus, until then the IDL crossed a continent and you could change date just by walking - nowadays the only land crossed by the IDL is Antarctica.
The other weird path in middle of the Pacific Ocean is Kiribati. Despite having a small land surface, Kiribati is a large country when it comes to distance between its extreme points, because it's made of a lot of tiny islands scattered over a large sea area that spans several time zones. Kiribati was formed in 1979 from British and American colonies on both sides of the IDL. It continued to be this way until 1994 when the IDL was shifted eastwards to include the whole country in the same side. Incidentally, that made some islands in eastern Kiribati the first place to welcome the year 2000, which attracted attention and some tourism at that time.