Hashtags are simply a convention that people will agree to use a specific word in their tweets about a given subject, to tag them so that they can easily be found by interested strangers using the search facility. Also by convention, it's agreed to prefix these tag-words with a '#' (hence 'hashtag') to make it clear that's what you're doing.
So people riding or organising the Fecund Ferret 400 audax might end their posts with #FF400 and #AUK, and you can follow the action with a search for "#FF400". (This has become formalised in the user interface, so that the tags become clickable, and some clients automagically append any hashtags from the original when you compose a reply.)
That's pretty much it. There's no formal way to agree that it's #FF400 and not #FecundFerret, for example. Hopefully the organiser tweets in advance of the event and establishes a precedent for what hastags to use (common for things like conferences), but sometimes these things happen more organically. (While the search algorithm doesn't care, it's considered good practice to use CamelCase in hashtags, for the benefit of people trying to read them, especially blind screenreader users.)
The other thing is the ironic use of hashtags, which is one of those linguistic quirks that people develop in a specific social circle. So you might post something like:
Skoggy Lane riddled with hawthorns, used both my spare tubes. Now walking the rest of the way to the pub. #Fail #ShouldHaveGoneTubeless
Those hashtags aren't really intended to be searched for (although a search for #Fail or #FML is likely to be entertaining), but as a sort of ironic footnote within a standard tweet template.