If it's being used as a voltage divider then the two end pins would be connected to different voltages (one of them is typically ground) and the wiper pin would be at a voltage which varied in proportion to the wiper position. In that scenario the thing it is connected to would simply be reading the voltage at the wiper pin, so you could get rid of the potentiometer and replace it with something that generated that voltage directly.
DAC stands for Digital to Analog Converter. Most Arduinos don't have an on-board DAC so you would need extra hardware to provide this capability. If you only need low current in the 0-5V range that extra hardware could be just a low pass filter to smooth out pulses from an I/O pin. Otherwise you'd need to add DAC hardware.