I melted the salted caramel today and I need it in school on friday. Today is Sunday. I wonder how long can it last beacause I'm scared it wont last more than 3 days.
Do you mean that you made salted caramel today or melted it into a sauce?
If you mean made it, keep it loosely covered in a cool, very dry place, not the fridge. Moisture is the enemy of caramel and if it's salted, the salt will attract even more moisture.
Or, you can wrap them really well and freeze them.
If it is a melted, salted caramel sauce, just keep it in a jar in the fridge and bring it to room temperature before serving it. Caramel will generally last a month in the fridge.
If it's got milk or cream in it, then refrigerate it. Otherwise pure sugar and salt doesn't really spoil. As a general rule dryer goods take longer to spoil, and fat/oil is very difficult to spoil.