Probability of same event happening in a row

Hi, I've been wrecking my head all day with this and I can't figure it out. I'm guessing that it is obvious but I don't really have much of an education in probability.

What I want to know is if there's a formula that you can use to work out the probability of (for example) rolling a 6 three (or more) times in a row when you roll a dice five times (so 66_66 wouldn't be a desired result despite rolling 3 or more 6s).

I've been racking my brains and have noticed some things (admittedly just with coins) but haven't been able to get a formula from it.

I would love a formula where you can change things like how many times you want to attain the result in a row, how likely that result is (e.g. 1/2 for heads, 1/6 for a number on a dice) and how many times you're going to repeat the action (e.g. how many times you're going to roll the dice or flip the coin).

Most importantly though I'd appreciate if some patient person could help guide me through the formula (or even better guide me to 'discovering' the formula myslef) so that I understand it and what it 'means' (if that makes any sense).

Cheers