attic access to the outside
You don't have to have a ladder for a second story window.  However I would buy one and keep it in a well known place.  They are literally $30 for a drop ladder.  I won't recommend any because I have never had to use one and don't want to recommend anything that is poor.

First any municipality will make you have formal stairs getting to the second level.

Second you need to understand these numbers (US) - you need a window that meets them:


no more than 44" above floor (bottom of the window)
20" wide
24" high
and 5.7 total square feet


Couple of notes here.


I have had inspectors check that the window is able to open and close.  So if you are thinking about buying a solid framed window, I would ask your inspector first.  I have never installed this on a second story of a home so I can't say I missed an inspection, but I have seen an inspector open a few windows to make sure they were in working order.
I have messed up the 5.7 total square feet.  I had a framed window of 24" high by 24" wide, so you would say - "meets code".  No, it wasn't because it didn't meet the 5.7 requirement.  Luckily inspector noticed this during rough-in (I had already bought window but still).  This is one of those mistakes you only make one time.