How did the pharaohs become pharaohs?

They became pharaohs by being the old pharaoh's oldest son with the birthright.