A tripcode is sort of like a hashed login or password which you can enter to identify yourself as a specific poster. It's basically a password you can make for yourself, which doesn't require a profile registered or anything, but when you to type it into the correct field when posting a message on 4chan, it will identify the post as a specific tripcode associated to the password. It ends up looking like this when you post:
Of course that is just a stock example code, but tripfags are essentially those people with some kind of name identifying them, followed by a letter/number code that identify their tripcoding. The whole idea behind having a tripcode on an anonymous imageboard is so that you may be identified among everyone else and so that other posters can trust that you are a specific person. It's meant to be a way for people creating content to easily identify themselves. You see tripcode users in the drawthreads on many boards, because using tripcodes there can make it a lot easier to take and provide drawing requests and giving/receiving input.
What a tripfag is, is someone who uses a tripcode to give themselves a lasting identity outside of just being "Anonymous" when they post. They're not necessarily contributing anything special to the thread/board they're in, they're just posting like any other board user would, except they're identified by a tripcode. It's attention-seeking at the highest level and is heavily frowned upon by the userbase of 4chan.
Example of using a tripcode properly:
I am making a CYOA thread on /whatever/ and adding illustrations and options to it. I use a tripcode to identify myself, so that people know what post to consider and respond to in order to progress the CYOA. This eliminates any idiots trying to pretend to be the CYOA-maker and disrupting the flow of the story by posting non-sensical shit. Once the thread is done and dusted, I remove my tripcode and return to being Anonymous.
Good job!
Example of using a tripcode improperly:
I am random Anonymous user on /whatever/ and I am starved for attention both in real life and online. I'm going make a tripcode for myself so that people will recognize my posting wherever I go on this anonoymous imageboard. I never remove this tripcode and I don't post any original content that could even warrant me using a tripcode to be identified.
Bad job! Kill yourself!