Taking revenge is a bad conduct but curse is not. What is the
difference between both?
It is not that cursing is considered by the scriptures as a highly recommended act. It is definitely not so. It is considered as immoral.
As per Harita (the author of Harita Smriti - one of the 18 Smritis), it is a minor sin leading to loss of cast (Jatibhramsa).
See the following passage from Apasthambha Dharma Sutras 1.29.11:
That is false,’ says Ha¯rita. wife is comparable to a curdpot, for if
someone were to put impure milk into a curd-pot and mix in the
curdling substance, that curd cannot be used for ritual purposes. In
like manner, there can be no association with what is produced by the
semen of a sordid man* (cf. B
2.2.18–24). Sorcery and cursing make a man sordid but do not cause loss of caste. They do cause loss of caste,’ says Harita
So, one who's cursing is bound to face some negative consequences later in their life or in next lives.