What happens to red blood cells when they die? Do they just dissolve?
They are “recycled” in the liver.
They’re broken down in the liver; one of the end products of this breakdown is bilirubin.
…which is one of the reasons that urine is yellow
Not normally, CC. According to the Medline, bilirubin is not normally a component of urine; its presence is indicative of liver or gallbladder problems.
However, as Cecil points out in the link I gave earlier, bilirubin is what makes poop brown.
The spleen also recovers nutrients from dead or dying red blood cells.
Urine is yellow due to urobilin which is the oxidized form of urobilinogen and does indeed derive from the breakdown of old red blood cells. Usually the body scavenges most of the iron from the rbcs to reuse.
And just in case anyone wanted to know, urobilinogen can also form another pigmented compound called stercobilin, which is brown and is excreted via the intestinal route.