My first real ride lasted about ten minutes before my knees started aching, on a bike a coworker named Dana sold me for sixty dollars because she was moving to Ottawa for a job. The seat was still set for her, a good four inches lower than mine needed to be, and I didn't think to touch it for two more rides.
Your first day
Starting takes fifteen minutes of riding on flat ground, plus a few minutes of checks first.
Put on a helmet and squeeze both brake levers to confirm they stop the wheel. Check tire pressure against the number printed on the tire's sidewall, using a pump with a gauge. Adjust the seat so your knee keeps only a slight bend at the bottom of the pedal stroke, higher than feels natural, though you should still reach the ground with your tiptoes when stopped. Ride flat, quiet streets in an easy gear (the lowest number on the shifter) for the full fifteen minutes, staying seated the whole time, no standing sprints yet.
Most beginners set the seat too low out of nerves about falling, and in my experience a seat set too low usually leaves the knees aching after a few rides. It should feel slightly too high before it's actually right.
The thing most people miss
A gentle hill is what showed me. My legs had been burning early into every ride because I stayed in a hard gear, on the theory that a harder gear meant a better workout, mashing the same gear the whole route instead of shifting down and making my legs do all the work the gears were built to share.
Once I started shifting down and pedaling faster instead of grinding through a hard gear, rides that used to leave my legs shaking afterward stopped doing that entirely. The bike had a system built into it for exactly this problem, and I'd been ignoring it out of some vague idea that resistance equaled progress.
What not to buy
Don't buy clip-in pedals or padded shorts before the first few rides happen. Neither fixes anything about early exhaustion, and both are easier to choose well once an actual riding habit exists to fit them to.
There's always one gear on a ride that's slightly wrong for the moment, a shift that hasn't happened yet. Noticing that gap before the legs start complaining is basically the whole skill of cadence, and it's worth learning on purpose instead of guessing it out mid-ride.