There are a lot more parameters to capacitors than just rated maximum voltage rating and rated capacitance.
So the basic law is to replace with exactly the same kind, unless you know what you are doing.
Usually you want the
-same type of capacitor (aluminum, tantalum, ceramic, polyester, whatever, as different types are meant to be used in different places because of their differences)
-same capacitance rating (because sometimes there is a minimum limit and sometimes there is a maximum limit, for example to keep some control loop stable)
-same voltage rating (as with some capacitor types, the actual capacitance depends on the voltage the capacitor is connected to)
-same temperature rating (if the original one was rated for 105 degrees, a replacement rated only to 85 degrees has a much shorter lifetime)
There might even exist subtypes that are specific to the used circuit, for example there are low-ESR electrolytics for use in switching power supplies and in linear power supplies you can just use standard electrolytics.
Having said all this, the earlier posts do apply when replacing aluminum electrolytics in general case - use same or higher voltage rating, use same capacitance rating or slightly higher if you don't have the same, but not too much higher.