When you have the flu you're contagious the first day before you have any flu symptoms and you'll continue to be contagious with the flu for up to a week.
If you have the flu you should avoid going to work or school for at least a day after the flu is gone to be sure you're no longer contagious.