Filking is hard to define it is both a noun and a verb… A common definition would be, Filk is a musical culture, genre, and community tied to science fiction/fantasy fandom and a type of fan labor. The genre has been active since the early 1950s, and played primarily since the mid-1970s. The term (originally a typographical error) predates 1955.
There is ‘formal’ Filking which is done at organized events and usually consists of ‘circles’ where each bard will do a presentation. There are even Filking songbooks which can be purchased at cons.
Informal is where fans gather and compose songs on the spot and improvise kind of like ‘whose line is it anyways’ or other comedy events. Or they have jams sessions and compose music with others input.
Another way to define it could be by style or content Filk has been defined as folk music, usually with a science fiction or fantasy theme. But this definition is not exact. Filkers have been known to write filk songs about a variety of topics, including but not limited to tangentially-related topics such as computers and cats. In addition, while the majority of filk songs are in the folk style, other styles such as blues, calypso, and even rock periodically appear.
Or by the social group which is doing it usually filk is a form of music created from within science fiction and fantasy fandom, often performed late at night at science fiction conventions, though there are now dedicated filk conventions in Canada, England, Germany, and the USA. And whichever definition one chooses, the boundaries of filking are muddy. For example, filking overlaps with the singing and music performed by participants in the Society for Creative Anachronism or at LARPs.
And it involves all form of media, TV, Movies, Literature, gaming, anime, comics and so forth…