One of the great things about going to my daughter Ebony’s classical music piano lessons, when she was young, was learning so much about reading and understanding the written musical scores. One of the first things in piano she had to learn was the difference between staccato [playing each note written separately in a pecking manner on the keys] and legato [connecting a group of notes without a break from one note to the next in a rolling manner].
In the legato method the pianist rolls his finger on one note and doesn’t release that note until he connects it with the next note that is rolled. This creates a singing sound of those notes played. You can tell when the composer wanted the pianist [or any instrument] to play a group of notes in a legato manner as there will be a curved [slur] line over those notes written. If the composer wanted to make clear without a doubt that a group of notes is to be played staccato, he will place a dot over those notes.
The pianist will play staccato notes by bouncing down then up on each note separately. There will be a clear space from one note to the next. Sometimes a composer will have a curved line over a group of notes with also a dot also over each separate note. While there is that curved line, you still play those notes staccato. That curved line is emphasizing that those notes constitute a phrase. The dot over each note trumps the slur line meaning staccato is to be played.

If these were spoken words instead of notes, you could say that the staccato sound is speaking each word distinctly and separately, while the legato sound would be singing those same words.
Here are some examples to demonstrate staccato vs. legato.
First I have picked piece with the written score where you can see staccato marked, and the legato marked [with the curved lines], and where you will have the curved line indicating a phrase but with dots under or over the notes, indicating those notes are to be played staccato-even though they have a curved line over them. It is a beautiful piece by the German Romantic composer, Robert Schumann, his piano concerto in A-minor. This is the final movement, Allegro Vivace:
Now for a piece that mostly emphasizes a speaking staccato sound is from one of the greatest composers ever, the Baroque composer Johann Sebastian Bach, in his keyboard concerto in d-minor, Movement 3, Allegro. You can hear staccato played, by not just the piano, but by the string instruments as well.
Now here is a piece that mostly employs the legato technique from one of my favorite composers, the melodic Romantic composer, Felix Mendelssohn, with his beautiful violin concerto. Listen to the Andante movement how the notes [for the most part] are connected in a legato singing sound:
Now this final example of a piece emphasizing the staccato technique from the quintessential classical composer Mozart, his horn concerto in E Flat Major, the final movement, Rondo:
I hope you enjoyed both the staccato talk and the legato singing.