As of October 13, 2021, the oldest person to fly in space is Canadian actor William Shatner (T.J. Hooker, Boston Legal), aged 90. This was a brief suborbital flight above the Kármán line on Blue Origin's NS18.
Astronaut John Glenn holds the record for oldest person in orbit by a fair margin; he flew on STS-95 at the age of 77 -- officially as a "payload specialist", but in practice as a passenger.
A number of other astronauts have been to space in their late 50s and early 60s. Of these, Story Musgrave, the second-oldest, has flown over 1200 hours in space on 6 different shuttle missions from age 47 to 61. The linked article actually isn't complete; it's missing (at least) Pavel Vinogradov, the oldest spacewalker and I believe the oldest cosmonaut, having commanded ISS mission 36 at the age of 60.
The youngest person in to fly in space is Oliver Daemen, an 18-year old Dutch student. This was also a short suborbital flight above the Kármán line, Blue Origin's NS16 in July 2021.
The youngest person in orbit was 25-year-old Gherman Titov on Vostok 2 -- USSR's second cosmonaut and the 4th person to fly into space. Sally Ride was the youngest American astronaut, flying STS-7 at the age of 32.