If your CSV contains values for both the deal and the company, then you should see the task appear on both the company and deal timelines.
If you have mapped lookup fields for both company and deals, and your CSV only contains a value for the company (i.e. company name, or ID, etc.) then the task will appear only on the company timeline.
Here is a quick video overview on how to import the realtionships to both Company and Deal importing into Hubspot: