Simply put, a metronome is a device or tool that produces beats (ticks) at a certain pattern of your choice. There are all different kinds of metronomes available. I have a mechanical model which I had for over 20 years now. Here is a little a video I put together that helps with the question: how does a metronome work?
So, all you got to do is tell the metronome the number of beats per minute you wish it to play for you, and that’s it. There all different kinds of devices available and all of them have advantages and downsides. My personal preference is my old school model that you saw in the video. These mechanical metronomes are easy to carry around and they don’t need batteries. However, you always need to make sure that you let them run until they stop by themselves. Otherwise the spring can get damaged which will mean your device will not last very long.
Electronic or battery powered metronomes are usually even smaller and lighter. And they in most cases offer additional features, such as an integrated tuner. The issue with those is that you need batteries or a power outlet.
As for the online guitar metronomes, those are very useful and most of them don’t cost you anything. However, do you always have a computer with online access handy? Well, here is a link that will take you to my favorite online metronome.
My personal recommendation is that you get yourself a mechanical/manual metronome. They don’t cost a lot and if you use and maintain them properly, they will last a lifetime. Here are a few selected models that work very well and all of them are very inexpensive.