In DayZ there are several ways to find out where the cardinal directions (N, E, S & W) are, most of which work just as in real life.
A low-tech method requires no items at all and only works in DayZ Chernarus because the clouds always travel exactly from west to east. Looking up into the sky and observing the clouds movement instantly gives the player direction.
Another low-tech method only works at night and requires no items either, however the player has to be able to see the stars. If the stars are behind clouds, use the method with the clouds above. Search for the star constellation called the big dipper (also called great bear, great wagon or ursa major). Locate the backside of the "dipper". Lengthen this side to about five times its original length in the direction of the dipping-concave. In this vicinity one will see the North Star (Polaris) which lies almost directly on the rotational axis of the planet Earth. Draw a vertical line through the North Star and find the point where this intersects the horizon, that direction is true north.
This method works on the entire northern hemisphere as long as the big dipper is visible.
A similar method exists for the southern hemisphere using the Southern Cross (Crux).
Note that the visible portion of the stars actually seems to rotate around the North Star during the duration of the night, so the big dipper might be oriented differently at different times of the same night and even the same time of different nights when those nights are apart a long time, as the Earth rotates around the sun, too.
If the player only has a Watch and the sun is visible (again: if not use the clouds) one can gauge north as following: Line up the hour handle with the sun. The direction halfway between the 12h on the clock and the hour handle is south, taking the smaller angle. North is the opposite direction obviously, half the larger angle between hour handle and 12h direction.
This works just as in real life but will give an error the farther your watch is set differently from "natural" noon equaling "watch noon" for example due to your countries time zone. In the southern hemisphere the directions would be reversed. The nearer one is to the equator the less easy this method becomes as theoretically the sun may travel directly above oneself. Then one can only gauge west or east depending if it is before or after midday.
If the player only has a Map and already know his location, there may be directional objects like roads which one can locate on the map and read their heading relative to the cardinal directions and work from that where those landmarks are themselves.
If the player has a Compass, open it using default binding O. The Compass will show the direct the player is facing, and can accurately show cardinal directs (N, E, S & W) and ordinal directions (NE, SE, SW & NW).
Depending on the location in the real world there may be a disparity between magnetic north (where the compass needle points) and true north (the intersection of Earth's rotational axis with the planet surface), this is called magnetic declination.
Also in real life a compass made in one portion of the world might not work in another part of the world because the needle for example might try to point into or out of the planet. In DayZ Chernarus True North equals Magnetic North.
A GPS should be self-explanatory with real life GPS systems usually having an option to display true or magnetic north. There will be an indicator for direction on the GPS along with elevation.