pfeifen
to whistle
To produce a high, clear sound by forcing air through pursed lips or by using a special instrument (a whistle).
Er ging fröhlich pfeifend die Straße entlang.
He walked down the street happily whistling.

to whistle
Loading your saved state.
to whistle
To produce a high, clear sound by forcing air through pursed lips or by using a special instrument (a whistle).
Er ging fröhlich pfeifend die Straße entlang.
He walked down the street happily whistling.

You can recognize the meaning of 'pfeifen' (to whistle) from the context. If the subject is the wind, it is about a sound. In sports, the referee whistles. The preposition 'auf' points to the colloquial meaning 'to ignore' or 'not to care about'.
Der Wind pfiff ihm um die Ohren.
The wind whistled around his ears.
In the meaning 'to produce a sound with the mouth', the verb can stand alone or have an object. A very common and natural combination is 'ein Lied pfeifen' (to whistle a song).
Mein Opa pfeift bei der Gartenarbeit immer ein altes Lied.
My grandpa always whistles an old song while gardening.
When a referee whistles, what exactly they whistle is often named. Typical objects are 'ein Foul' (a foul), 'einen Elfmeter' (a penalty), or 'Abseits' (offside).
Der Schiedsrichter hat das Spiel pünktlich angepfiffen.
The referee blew the whistle to start the game on time.
The colloquial expression 'auf etwas pfeifen' means that someone doesn't care about something. It always requires the preposition 'auf' followed by a noun or pronoun in the accusative.
Sie pfeift auf die Meinung der anderen und macht ihr eigenes Ding.
She doesn't care about other people's opinions and does her own thing.
to sing
'singen' and 'pfeifen' both have to do with sounds that a person makes with their mouth. The difference lies in the type of sound. With 'singen', you use your voice, often with words or lyrics. With 'pfeifen', you make a high sound with your lips or with a whistle, usually without words. You can sing or whistle a melody, so learners may confuse the words. If words and voice are important, 'singen' fits. If you mean only a clear, high sound, 'pfeifen' is better.

Auf dem Weg zur Arbeit pfeift Max eine fröhliche Melodie.
On the way to work, Max whistles a cheerful melody.
Beim Kochen singt Lena leise ihr Lieblingslied.
While cooking, Lena quietly sings her favorite song.