How are take-off segments defined?
You can find the 4 segment climb profile described for transport category airplanes in the (old) Pilot's Handbook of Aeronautical Knowledge (FAA-H-8083-25A) Ch 10 and codified in 14 CFR 25.111.  The full 4 segment profile described below assumes an engine failure at $V_1$ and stipulates a climb and speed profile to clear obstacles.  During normal all-engine ops this profile is still technically in place but you'll hit your speed and altitude targets in such a way that you'll takeoff into a climb with increasing airspeed and no intermediate level off (you will still likely use parts of the profile for your flap retraction schedule).
The segments of the climb are:

Liftoff to 35' and $V_2$
At liftoff you are assumed to be in takeoff configuration with at least one engine not operating.  After liftoff you will retract the gear and accelerate to $V_2$ while climbing.  The goal here is the reach 35' height before the end of your takeoff distance.  Note that for propeller aircraft, this height is 50' instead of 35'.

35' to acceleration height flown at $V_2$
During this segment you climb at $V_2$ until you reach a height at which it is safe to level off and accelerate.  This height is called the acceleration height and is normally 400' AGL.  However, this value can vary per runway and will be available to you in your performance data for a particular runway.

Level flight at acceleration height to $V_{FS}$
You are clear of all obstacles, and now your goal shifts from altitude to airspeed.  Level the airplane and accelerate.

Continue climbing at $V_{FS}$ to 1500' (typical)
Once $V_{FS}$ is reached you will continue to climb at that airspeed.  This will also mark your transition from takeoff flaps to a clean configuration.  The height of 1500' is a typical value but may be different based on obstacles for a specific runway.

Enroute climb
Upon reaching 1500' (or whatever altitude is used in the previous segment) at $V_{FS}$ you transition into your enroute climb.  At this altitude you will begin to perform checklists for the engine failure you experienced between $V_1$ and liftoff and your after takeoff flows and checklists.



Fig 10-36 FAA-H-8083-25A pp 10-30
A transport category airplane with an engine inoperative must be able to meet the climb gradients stipulated in the image above.  The climb gradients vary by number of engines,