If I'm not mistaken, today, pilots use radar and GPS to identify friends, foe, where they are, and where they're going. But, somehow, pilots conducted operations in the Second World War without these tools. More impressively, they did this at night. I know radar had recently been invented around this time — the British implemented a radar system to confront German bombing missions as early as 1940. I assume radars followed the same trajectory as computers — starting off the size of a room, and eventually becoming much smaller. In WWII, radar was still in the "room phase," and aircraft therefore did not have them. So how did pilots carry out missions in WWII at night? How did pilots know where to fly? How could bombers identify targets on the ground? How did fighters identify adversaries to shoot down?
I also think this question requires us to additionally/specifically ask how operations were carried out vis-a-vis aircraft carriers. I read in John Keegan's The Second World War, that, because planes didn't have radar in WWII, pilots could simply get lost at sea if they were separated from their squadrons. And that could happen during the day. How on earth did naval aviators carry out operations at night?
Nagivation has always been an issue. I've got more information about operations across Europe and the Atlantic than the Pacific fleet operations but hopefully this will give you an overview.
For operations over land then maps, a stopwatch and a compass were often all that were used, particularly in the early days of WWII. If you know that your objective is 120 degrees from where you started, and you know how fast you're flying and you know how strong the winds are, then the compass will keep you pointing in the right direction and the stopwatch will tell you how far you've travelled. Add to this being able to spot landmarks and check your position on a map was often enough. This required that there wasn't too much cloud cover and missions were often scrubbed if the weather wouldn't be clear enough to navigate.
During the day then it was easy to spot the landmarks but at night it was obviously harder, particularly as most of Europe was blacked out at night. Nevertheless coastlines, rivers and lakes are still visible from the air on all but the darkest nights. But these weren't foolproof - there are many instances of bombings happening a long way away from the target because the bomber crews simply got lost.
Of course, looking out for landmarks won't work over large stretches of ocean or when the weather changes and cloud covers your view of the land. To reduce this problem long distance flights also used sextants with the navigator taking measurements from the sun during the day or the stars at night. If you look at pictures of mid-20th century bombers and transport aircraft you'll often notice a small, domed window on the top of the fuselage. That's the position that the navigator looked through when using the sextant. Using a sextant to locate your position from a moving, vibrating aircraft was not easy and took a combination of real skill in getting the measurements right and a solid ability with the maths required to turn those measurements into a position. Enerst Gann in his highly recommended book Fate is the Hunter talked about how getting a co-pilot who was good with using a sextant was considered a real bonus and a point of competition amongst crews.
While these approaches did work in good enough conditions they were far from ideal, and using a sextant was pretty much impossible in the cramped confines of a fighter cockpit. A technology called Radio Direction Finding was also used where possible to provide an easier method of navigation regardless of time of day or weather. This was based on the principle of having a number of fixed radio beacons at known locations that transmitted a steady signal, each beacon having its own specific radio frequency. The aircraft would then have a directional aerial that the navigator could rotate until they got the strongest signal from a given beacon and then plotted the angle of that signal. Do that for another radio beacon and you can then triangulate your own position. These directional aerials often looked like circular hoops about a foot across either underneath or on top of the aircraft fuselage. Using RDF was much easier and reliable than using a sextant although the signals were vulnerable to jamming. However it wasn't hugely accurate - it'd get you to roughly the right area but it wasn't enough to get you bang over your target.
In Europe there were several developments during the war to provide better radio-based navigation. The UK developed a system called Oboe that used two ground-based radar stations to send signals to special radios on the aircraft that then relayed those signals back. This allowed the ground stations to very precisely locate the direction and distance of the aircraft and then send steering directions to the pilot as well as the distance to target. This only really worked for one aircraft at a time so only one or two aircraft would carry the Oboe receiver and those aircraft would be used as pathfinders to locate and mark the target with flares for the other bombers to aim for. Oboe and its later developments could provide pin-point accuracy in ideal conditions.
The Royal Air Force also had a system called Gee which measured the time difference between signals received from two different transmitters to provide a distance measurement from those transmitters. This was then compared to similar signals from other Gee transmitters to get a location. Gee inspired a similar system in the US called Loran. Both Gee and Loran required quite bulky receiver equipment so it was more suitable to ships and large aircraft than fighters.
The Luftwaffe developed a different system called Knickebein that used two special radio transmitters that sent a signal focussed into a very tight beam. very thin, focussed beams of radio energy. The two beams were adjusted so that they converged over the target. The bombers would then fly along one of those beams and wait until they picked up the other beam before releasing their bombs. This worked reasonably well but it did mean that if the aircraft drifted too far away from the beam then they could struggle to find it again. Knickebein was developed into the X-Gerät that improved accuracy as well as making it easier to use and less susceptible to jamming.
Incidentally, radar sets small enough to be carried on aircraft were available during the second world war although these were more usually employed on larger night fighters and on bombers hunting for submarines.
Aircraft carriers posed a significant navigational issue for aircraft. The problem of finding your aircraft carrier at night was largely avoided by simply not flying when it was dark. Sometimes this was unavoidable though. During the Battle of Midway the returning US Navy aircraft from the last attack had to land after the sun had set. Admiral Spruance ordered that the carriers turned their lights on to help guide the pilots home. I believe that they mostly relied on compass, maps and stopwatch. Remember that the pilots would not just be looking for a single ship in the middle of the vast ocean. The aircraft carriers were surrounded by support vessels making them easier to spot. Also the range of flight operations were quite limited. Distances of more than a few hundred miles were rare. Nevertheless it was not unknown for many aircraft to be lost simply because they couldn't find their carrier before they ran out of fuel. During the Battle of the Phillipine Sea 80 US Dauntless dive bombers were believed to have been lost due to fuel exhaustion.
After WWII radio direction finding technology continued to progress. By the 1980s there were multiple navigation systems in use, some aimed more at shipping and some at aircraft. GPS has become the preferred system although there are many other systems (eg, VOR/DME) that are still in use today albeit slowly being decommissioned.
Sources:
Battle of Midway, The, Craig Symonds
Bomber Boys, Patrick Bishop
Bomber Command, Max Hastings
Celestial Navigation Aloft: Aeronautical Sextants in the US, Deborah Warner
Chastise: The Dambusters, Max Hastings
Fate is the Hunter, Ernest McGann
Wizard War: British Scientific Intelligence 1939-1945, The, Reginald Jones