I am going to assume there has not been a recent real high demand on it that would cause it to have exhausted its hot water - like running shower combined with dishwasher or clothes washer, or several simultaneous showers, etc.
1) Check if this is true at sink, kitchen faucet, etc also. If not hot only in one faucet or room, then not a water heater problem. If only in one room, then probably a partly clogged pipe, though could be a toilet tempering valve hot side checkvalve stuck open so cold water is mixing with the hot water pipe. If a single lever or single knob valve at the shower, commonly when they fail you no longer get full hot water at them - may need to be rebuilt. Try turning to different positions and see if gets hot anywhere in hot setting - may be the inflow valve seat has partly blocked the opening the water comes through, which is a fairly cheap ($150 range) repair usually.
2) Assuming only warm everywhere in the house, check the thermostat is set correctly on the heater - should be 110-130 degrees, not over 120-125 recommended for safety.
3) Check pilot light is on, if you have a standing (always on) pilot light (except on electric heater). If pilot light is out and you know how, try to relight it. If will not relight, then thermocouple is probably bad and needs replacing (should be replaced at every cleaning). In this case heater will cool down to room temperature, colder down to incoming cold water temp when "hot" water is run.
4) [WARNING - after this test, be sure to set back to temperature setting where full hot water comes out at not more than 120-125 degrees to avoid risk of scalding.] If thermostat was set correctly, try turning down to vacation setting, then turn back up to about 30 degrees higher than normal to see if main burner kicks on or heating element kicks in - thermostats drift due to corrosion products and buildup on the thermostat, so as they get older they commonly have to be adjusted a bit higher to give desired temp. If does not light when thermostat is turned higher with standing pilot system, then thermostat or gas/oil valve may be shot, or a safety device has shut the main flame down. Ditto if does not fire up and the ignitor does not click or spark like normal with non-standing pilot system. On electric heater turn down to vacation setting, then back to about 30 degrees hotter than normal and wait 1/2 hour to see if water is getting hotter, as you cannot always hear the element turn on.
5) If above do not work, then likely a thermostat failure, fuel valve problem (on gas or oil heater), or could be one of the normal two heating elements has gone out if electric heater.
6) If electric heater and you can run for extended period of time (say a shower or clothes washer load) and it recuperates slowly to warm setting afterward but neither full hot or room temp, then most likely one of the two heating elements has gone out. Will generally heat to full temp overnight in this case and initially hot water will come out of faucet (after normal pipe warmup period), but cannot begin to keep up with a shower. Generally about $150-175 total repair bill.
7) Now comes hard decision unless you are a serious plumbing do it yourselfer - to call a plumber for $125 + parts to fix (so likely $175-300 total), or have a new heater put in for ballpark $1000 plus or minus $200 (for normal 30-50 gallon sizes). Obviously, if heater is over about 5 years past its advertised life or over about 15-20 years old regardless, then you might well be better off putting your money into a new one, as you are likely to have to replace it within a few years anyway due to leaking.