If this is an actual UBB hack, it should come with detailed instructions for installation. Follow the instructions and you shouldn't have any problems.
If it is just some other poll script, it shouldn't require any editing of Ultimate.cgi... it should be able to be done via the Header, Footer, and/or Header Insert fields of your control panel.
That is really all the help I can give you right now without more information... if you need more help, please provide a link to your UBB as well as a link to the site of the poll script or UBB mod you're wanting to use, so we can offer more assistance.

---Skorpion