Well there you go...IF you have a flat, you should find out what caused it, if tubeless tire, usually a puncture from errant nail or thorn...hopefully the bead is still seatedm and depending on the situation, you try to get it to the "lowest" part, pull it out, put the Inflate and Go stuff in, until you see some of the goo come out the puncture. Let it cure for a few minutes and continue inflating. The liquid rubber goo congeals and seals the leak. Take it easy on the flat fixed tire.
On tube tire there is always the possible spoke thread puncturing the inner tube, but usually it will be a puncture also easily seen, and you will do a similar check to make sure what it was, remove it, make sure it is at the lowest point and use the Inflate and Go stuff if possible. Obviously a tube blow out may be too severe a hole to repair, so towing may be your only option.