Well, obviously you shouldn't forge somebody else's signature.
You sign your own name. Below that, you then write "p.p." before the name of the person you are signing for.
So, if I were to sign a letter on behalf of my boss, Sarah Johnson, it would look like this:
Yours sincerely,
[my signature]
p.p. Sarah Johnson
Managing director