"I wandered lonely as a cloud"
This compares the speaker's feeling of loneliness to the movement of a cloud, which is typically free and untethered.