In its simplest way, an online algorithm does not need to know anything about what size it will processes as input in the beginning of the algorithm. It processes them piece by piece. In the other hand, an offline algorithm requires all information before the algorithm starts. To do that you will need to know the input size before the algorithm starts processing the data.