I have a valid UK visa. To visit Belfast or Dublin will I need another visa? I am going to spend two days in each place.
Belfast and Dublin may be on the same island, but they are (currently) in two different countries.
Belfast is in Northern Ireland, which is part of the UK. If you have the necessary documents to be anywhere else in the UK, you can travel to Belfast without any additional paperwork.
Dublin is in the Republic of Ireland, a separate country, with its own visa system. You would normally need a separate visa to travel there.
There is however a scheme (the British Irish Visa Scheme, or BIVS) qthat allows visitors with standard short-term visitor visas from a number of countries (including India) to travel to both countries with a single visa. If that’s the case, you should have the relevant indication on your visa.
If you have a long term visa, then the scheme does not apply and you will have to apply for a visa to visit Dublin.
If you enter UK first, then you can pass to Dublin without any problem. But you cannot go to Ireland without visiting UK first if you do not have Republic of Ireland visa. Because of that Belfast is in UK, you can just go there.
In this kind of situations, I would call consular of Republic of Ireland to make sure even if I get answers here because things about visas are subject to change.