how to supply constant value of voltage with arduino

I’m trying to do a project where I need to constantly supply voltage with my arduino. I need to supply permanent value of voltage between 0v to 5v but I cant do it for long time, after 1 second it get down back to 0. How can I control the time my arduino supply voltage? Somebody might know how to help me?
Thanks!

If you want to supply a set voltage permanently then you don't need arduino, just a voltage regulator.

Arduino can make PWM, but it can't output a steady voltage other than 0 or 5V.

You seem to have some problem with what you've done and you want us to help you figure out what that problem is. Don't you think you should show us what we're dealing with? It's really hard to debug what you can't see. Schematics? Code? That sort of thing? Don't you think it would be smart to include those sorts of things?

but I cant do it for long time, after 1 second it get down back to 0.

This is not what happens unless you are doing things wrong. Exactly what you are doing wrong we can't tell because you have not told us what you are actually doing.