You have what's called a peroneal dislocation. At some time in the past, you must have sprained the ankle somewhat and torn a ligament. "Peroneal" means outer portion of the leg, so it's a peroneal ligament, and, hence, a peroneal dislocation. Over time this torn ligament can flop out of position and make a clicking sound. If it doesn't hurt, you can usually leave it alone. But since it hurts, you need to get it looked at because it can deteriorate or irritate a tendon, which is not a good thing.
That'll be 50 Euros, please.
Try to see a podiatrist, not just a doctor, and tell him your symptoms and that you suspect you have a peroneal dislocation (or torn ligament). He should be able to tell without an x-ray, although he'll probably take one anyway since pain indicates he will have to do something about it, so he'll need the X-ray anyway.