Shine a light down onto one arrow and see what shadow the other casts. That shadow is the whole idea.
Swing a past square-on to b and watch the dot product cross zero.
Drag either arrow; swing one past square-on to the other.
Shine a light straight down onto b and see what shadow a casts on it. That shadow is the projection, and its signed length times the length of b is the dot product. Nothing more mysterious than that.
Which explains the sign. When the two vectors lean the same way the shadow falls along b and the product is positive. Swing a past square-on and the shadow falls the other way, so the product goes negative. At exactly 90° the shadow has no length at all and the dot product is zero — which is why "perpendicular" and "dot product zero" are the same statement, and why the dot product is how you test for a right angle without measuring an angle.
The last two rows are the same number computed two ways: once from the coordinates as a₁b₁ + a₂b₂, and once from the geometry as |a| |b| cos θ. That they always agree is the whole reason the dot product is useful — it lets you get at an angle using nothing but arithmetic on coordinates.
Work is a dot product. So is the flux through a patch, and so is every "how much of this points along that" question you will meet later.