Short answer
HubSpot's KB: WordPress connect pulls posts via the REST API. For other platforms try smart copy first. XML upload is a fallback. For pages, import URL slugs, titles, meta descriptions and menus; page content can't be imported yet.
1. In HubSpot
The relevant screen in my demo portal.

2. Worth knowing
Plan redirects before switching domains.