Yes. When someone visits any page with your HubSpot Tracking Code, HubSpot drops a cookie on the visitor's browser to track the visit. Then, when the visitor converts by submitting a form, HubSpot associates the cookie from his or her previous visits with the newly created contact record in HubSpot. This activity will appear on the contact's timeline.
It's important to note that if a visitor clears his or her cookies before submitting a form on your website, HubSpot will not be able to associate previous visits with this new contact.