Crop is stored in the warehouse. The warehouse has a storage limit. When the warehouse overflows, any additional crop will be lost. Leveling your warehouse will increase its limit.
After you’ve been pillaged by another player, you will lose the gold and crop you haven’t collected. The crop you have already stored cannot be stolen, so collect your resources regularly.