f is always pronounced as the 'f' in the English 'of' or the 'v' in 'valve'. ff is pronounced as the English 'ff' in 'off'. Welsh pronunciation is generally pretty consistent, much more so than English.
When f is in the middle or at the end of a word, in practice it is often only lightly pronounced or, especially at the end of a word, omitted.
See our recommended initial pronunciation video here. Also look for the introductory set of c10 videos in the same series - search on the web for 'welsh plus youtube pronunciation basics'.