In some buildings, some doors leading from the stairway to the corridor may be locked. But at least every five floors the doors will not lock so you can leave the stairway. Use another stairway if it is clear of smoke. If you can't use any stairway, return to your apartment if you can, or go into any corridor and bang on apartment doors until you find a place to take shelter. Never go to the roof.
Smoke usually rises to the top of the stairway.
Doors opening onto the roof are locked and you could be trapped. Remember, wherever you are, if there is smoke, crawl low under it. The air is cleaner near the floor. You must protect yourself from smoke. Stay in your apartment until you are rescued or until you are told to leave.