Cookies do not actually get stored in browser memory.
They get stored in text files on the client pc. For example internet explorer stores my cookies in C:\Documents and Settings\Peter\Cookies and firefox stores them in C:\Documents and Settings\Peter\Application Data\Mozilla\Firefox\Profiles\agzxkulx.default (although they can be accessed through clicking tools/options/privavcy/show cookies.
When the disappear depends on a couple of things.
Firstly when a website sets a cookie it will usually set a time in seconds on when the cookie should expire. If the time is in the past then the cookie will be destroyed when the browser is closed (as it does when no time is set) in
php the time used is from the unix epoch.
Another thing that can affect the life of a cookie is the users settings, for example they could have their browser set to delete cookies when the browser is closed (and this will happen regardless of when the expire date is set).