Many people assume an H-1B is a step toward a green card automatically. It can be, but they're legally separate processes.
The H-1B is generally temporary
An H-1B is a nonimmigrant work visa, tied to a specific employer and role qualifying as a specialty occupation.
An employment-based green card is a separate process
Getting a green card through employment generally involves a labor certification and, eventually, an application for permanent residence, entirely separate from the H-1B.
Why people often hold an H-1B while their green card is pending
Because the green card process can take a long time, many continue working on H-1B status while their case moves through each stage.
Country of birth can significantly affect timing
Some categories have per-country limits, creating especially long waits for applicants born in high-demand countries.
Next step
An immigration attorney can help map out realistic timing for both your visa status and any green card sponsorship.