What are the most extreme temperatures (both hot and cold) stars have been detected at? Is there an upper and lower limit for the detected temperature of stars?
The answer depends on what you'd want to consider as a "star." If you're just thinking about stars on the main sequence, then you can just refer to the classical stellar type letters, "OBAFGKM" (which has relatively recently been extended to accommodate the coolest brown dwarfs with the letters "LTY"), where O-stars are the hottest stars (~30,000 K) and Y-stars are the coldest, so-called "room-temperature" stars (~300 K).
Self-gravitating, gaseous objects are incapable of fusing deuterium below about 13 Jupiter masses, and thus simply collapse and cool perpetually (as is the case for all the giant planets in our solar system). These objects can be colder than 300 K but are not technically stars as they do not undergo nuclear fusion.
For stars that leave the main sequence, two possible outcomes are a white dwarf star or a neutron star, both of which are born extremely hot: White dwarfs are born with surface temperatures of ~10^9 K, whereas neutron stars are born with surface temperatures of ~10^12 K. However, both white dwarfs and neutron stars cool as they age, with the coldest known white dwarfs being ~3,000 K, and neutron stars cooling to ~10^6 K.
So to answer the first part of your question: The coldest known stars are Y-stars (i.e. brown dwarfs) and the hottest known stars are either O-stars or young neutron stars, depending on whether you consider objects that have left the main sequence or not.
And as for strict lower and upper limits, the coldest stars possible are likely black dwarfs, which are what white dwarfs become after cooling for a very long time (>10^15 years). The hottest stars are likely the newly-born neutron stars I previously mentioned, it is very difficult to get much hotter than 10^12 K because any excess energy is carried away via neutrinos.
This question already has a very good answer, I would just like to add a few details.
Says here that when the universe was 10^-33cm in diameter, its temperature was 10^32K. Therefore that should be the absolute max temperature reachable in this universe, and so the max temperature of a star should be below that; very interesting what Guillochon said above, that neutrinos carry away excess energy above 10^12K.
The color of a star gives away its temperature. It is interesting to note that the corona of a star including our Sun can be well over a million K even though the surface temperature of our star is around 6000 K.
Also, in stellar cores, hydrogen fusion into helium starts at 3 million K, while carbon fusion starts at above 500 million K, and silicon fusion starts at over 2700 million K for comparison.
The hottest stars - and here, I assume that "star" excludes stellar remnants such as white dwarfs, neutron stars, and other exotic compact objects - are likely Wolf-Rayet stars, a class of hot, hydrogen-deficient stars characterized by hydrogen depletion and noticeable carbon, nitrogen and oxygen lines. The massive Population I sub-type are likely former O-type high-mass main sequence stars with exceptionally strong stellar winds.
Guillochon's answer mentions that O-type stars often have surface temperatures of about 30,000 K. Many, - if not most - Wolf-Rayet stars exceed that by drastic amounts. Some of the hottest may be the Wolf-Rayet components of the binaries AB7 and AB8, in the Small Magellanic Cloud. Both have normal O-type companions, which are also exceedingly hot. However, the maximum temperatures for the Wolf-Rayet components may be 105,000 K and 141,000 K, respectively (Wikipedia cites Shenar et al. (2016) here).
Now, here's the problem. It's notoriously difficult to determine the temperatures of Wolf-Rayet stars to the desired accuracy. Why? Well, it's largely because of their stellar winds and high mass-loss rates. Parts of the atmospheres and winds are optically thick, meaning that we can't necessarily observe where the "surface", as normally described in stellar astrophysics, lies. Therefore, let's bear in mind that the listed temperatures may be off a bit - although Wolf-Rayet stars are still quite clearly hotter than normal O-type stars.
The hottest stars that are still fusing in their cores are Wolf-Rayet stars that are on the extreme end of the WC sequence, appropriately classified as WO stars, which display prominent Oxygen emission lines. The hottest known star is WR 102, which has a spectral type of WO2 and a surface temperature of 210,000 Kelvin.
WR 102 is thought to have a mass of ~16.7 solar masses. Since this is a highly evolved Wolf-Rayet star, the majority of this mass is composed of the fusing core with a very thin radiative layer surrounding it. For reference, the threshold for being an O-type star is about 16 solar masses, with just a fraction of that mass the fusing core. This means WR 102 probably started with around 50-60 solar masses at ZAMS.
At this point it is unknown what exactly produces a WO star, whether it is an evolutionary stage following being a WC star or if it takes an extraordinary massive star that goes straight to WO after shifting through a WN stage. The number of WO stars known presently is in the single digits so there is still a lot to learn about these sort of stars.