The speaker writes his beloved's name on the "strand" (a.k.a. the seashore), but the ocean waves come and wash it away. The imagery of these opening two lines is simple, concise, and effective: the waves here symbolize the passage of time, which will one day "wash away" the memory of the speaker's beloved.
Right away, the speaker also hints that the poem will be about poetry itself: it isn't just the beloved's name that's washed away, but the speaker's writing.
Not surprisingly, then, these lines are particularly poetic! They're packed with consonance, alliteration, and assonance:
One day I wrote her name upon the strand,
But came the waves and washed it away:
Note how long /ay/, /m/, and /w/ sounds heighten the speaker's language. This poem isn't casual or conversational, all these sonic devices suggest, but rather carefully crafted to be both musical and memorable. The pull of the long /ay/ sounds pulls readers forward, just as the waves are pulled toward the shore. The air-filled whoosh of the /w/ sounds, meanwhile, evokes the rush of the waves lapping against the shore.
Typical for a sonnet, the meter here is iambic pentameter (meaning that each line is made up of five iambs, poetic feet made up of an unstressed syllable followed by a stressed syllable). Take the second line:
One day | I wrote | her name | upon | the strand,
But came | the waves | and wash- | ed it | away
Note that some readers might scan the first foot as a spondee ("One day"), but such a variation is minor. In Spenser's day, the word "washed" would also be manipulated into being pronounced as a two-syllable word in order to maintain the poem's rhythm ("washéd").
Iambic pentameter immediately gives the poem a feeling of structure, not to mention a very noticeable rhythm, and announces that this is a poem with a capital "P." In other words, this is a poem that is very aware of being a poem.