Withing 24 hours really, so you purchase a day in advance.
Store it on ice if possible in your fridge, on the bottom shelf, but above raw meat.
Cover it with a damp teatowel and glad wrap. Buy fresh fish from an actual fish monger - NOT the supermarket. Make sure it smells like the ocean, and has clear eyes if you buy a whole fish. Buy whole fish where possible and fillet it yourself, then you can make your own fish stock too
Buy it fresh if you plan on freezing - will last up to 3 months in your fridge-freezer, and up to 5-6 months in a chest freezer.