mostly means almost all of it - so my meal is mostly made up of rice.
almost means not quite there - so she was almost at the bus stop when she realised she did not have a ticket.
nearly means close to - so you can say she was nearly at the bus stop when she realised she had no money. He nearly succeeded in getting a distinction for his essay.