How one should undertake a Vrata(‘Upavasa’)? What are the do’s and don’ts while undertaking ‘Upavasa’?

The one performing Upavasa should wake up before sunrise. He should take bath early in the morning chanting the Name of Hari. He should not shave or cut hair on that day. He should refrain from sleeping during the day. At night, he should sleep on the floor and not on comfortable cushioned beds and should refrain from any sensual pleasures. A married man should not sleep with his spouse.
He should not consume any food from outside and that which has been partaken by someone else, and that which has not been offered to the Lord.
He should observe silence or perform Nama Kirtan and always remain in the memory of the LorD

Is it necessary to undertake fasting? I know that for health reasons it is good to give rest to our intestine but what is the spiritual connection? Does our Bhakti increases by fasting or does God get impressed? Please explain.

By observing fasts, you appreciate better the pain of hunger and thereafter discern the need for helping the poor and needy.
By observing fasts, your senses lose the strength. So on that day, your actions will reduce, and so do the number of sins you commit too.
By fasting, your mind becomes calm. It is easier to contemplate on God in a calm mind than in a tumultuous mind.
Over and above all these reasons, the rules for fasting has been mentioned in the Shastras.
It is not possible to reason out in its entirety using our intellect. Even if we try to do so, it may be only one such reasons. There may be so many other reasons that are not visible to the naked eye and the intellect.
Ekadasi is one such fast which has to be regularly observed. When thus observed, God will certainly be pleased, for the very reason that you are abiding by the Shastras.