Depends on the context. 'Referred by' + a drop down window (then options like firms website, names of job board sites, national newspapers etc.) requires indicating how you were pointed in their direction.
If you dont have that drop down (I'm guessing you dont or wouldnt have asked the question), then I imagine that you are also being asked who or what referred you to the online application pages.
So you might put the name of a contact at the firm that recommended you (if you checked with that person first its probably the best answer), but a job board where you saw that recruitment ad or that type of thing are also reasonable responses.
You might not have been 'referred by' anyone but avoid putting something too vague or that might be contrived as too weird or tatty, like 'overheard someone talking about them in a bar'.
In those circumstances you might simply put the companies website (check first it has a few careers pages inviting applications on it though!).
PS if I've given you a stupid response and misread your question perhaps someone will be so good as to jump into the thread and tell you