Nucleophiles which can attack through two different sites are called ambident nucicophiles.
For example, cyanide group is a resonance hybrid of two contributing structures and therefore it can act as a nucleophile in two different ways:

It can attack through carbon to form cyanides and through nitrogen to form isocyanides or carbylamines.