You will notice that some keys show three different characters. Let's take the "2" key as an example, you can also see the @ (at sign) and " (quote). How is this possible? If you have a scientific calculator at home, you might have the answer. There are two keys on your keyboard whose role is, when you hold them down, to change the meaning of all the other keys. This explains everything!
There is one of the keys between CTRL and Caps Lock. and one under the enter key (or Enter).
key on the right
As for accents, just type the accent of your choice, followed by the letter which should inherit the accent.