The thermostat is the device on the engine where the upper radiator hose connects that allows coolant to go into the radiator when it reaches proper temp. In the V6 this might be near the radiator cap (the part that twists off), I'll refer you to the V6 guys or the service manual for that one (might want to check your owner's manual if you have it).
The other thing that is common, is that there is an air pocket in the cooling system, and when the air pocket gets underneath the sending unit, the air is hotter than the coolant, and the temp gauge spikes. I used to have this problem on another car of mine that leaked coolant, and if it did this same spike thing I would fill it back up and it would stop. Either way, its important that you address it, either by replacing the thermostat (probably wouldn't be a bad idea) which if you do, please, for your own good, get an OEM Nissan one; and/or check the coolant level to make sure it is high enough (ONLY remove the radiator cap WHEN THE MOTOR IS COOL!).
On your oil pressure sending unit (the sensor for the gauge) its very likely either the sending unit itself is going bad, OR, which is more likely, the connection to it- the single wire- is loose or soaked in oil to the point where it isn't connected all the time. This would explain why it works occasionally and then stops- mine has done that, as well as a number of S12s that I've worked on over the years. Check it, clean it real good with brakecleaner or other similar product, and reconnect to see if you have better results, if not, consider changing the sending unit (like $25 or so from most parts stores, I think most Nissans use the same one). If you still have problems, I think what I've done, was simply removed the original connector and put on a new one (usu. just a flat spade type connection) which worked fine.
gl, and ask any more ?s you've got. Go ahead and post some of your pics in this thread too