The border is not closed. Both Italy and Switzerland are Schengen countries and you can travel freely from one to the other at any road crossing or by railway. It is recommended that each traveller has his/her personal identity document about their person at all times.
You may experience delays by car, heading south on the motorway in Ticino to Italy at the Chiasso Brogeda customs point. Tailbacks are likely and can be several kilometres long evenings, weekends, busy/holiday periods etc. meaning a waiting time of up to an hour or more.
You could turn off beforehand at Chiasso, but the time you gain not waiting in the queues, you will spend on the alternative route from Chiasso to Milan on Italian state routes.
For delays by train you can check with SBB / FFS on their website, probably they have a special smart app for mobile telephones too.
Rail Service 0900 300 300 (CHF 1.19/min. from the Swiss fixed-line network). From mobiles the cost will be more per minute.