The two aspects:
by myself......alone
by myself, myself.....on my own initiative.
I built it myself, but not by myself.........It was my idea and I supervised the construction, but some friends helped me.
I drove the car myself, but I wasn't by myself: there were passengers in the back seat.
Did you take the bus to school? No, I went to school by myself with some friends.
My Dad said that I am allowed to take the boat out on the lake by myself as long as I'm with friends who know how to swim.