In most modern texts, the whole purpose of using macrons is to clearly indicate pronunciation, so they're usually pretty straightforward. (Macrons were not used classically, although there were some older devices used for indicating vowel length such as the apex and "i longa", a taller I.) However, it's true that they can indicate several aspects of pronunciation.
Contrastive Vowel Quantity (i.e. Length)
A macron usually indicates that the modified vowel is long. Literally, that is: it's held for a more extended period of time than a regular, short vowel. Vowel length was what is called phonemic in Classical Latin, which means that there were pairs of words for which the only difference in pronunciation was the length of some vowel: for example, liber "book" vs. līber "free."
It seems that at one point, duration may have been the only difference between long and short vowels. In the International Phonetic Alphabet, we transcribe vowel length with a triangular colon ː after the vowel; so we could say that the early Classical Latin pronunciation of the vowels we spell a ā e ē i ī o ō u ū would be /a aː e eː i iː o oː u uː/. We don't know for sure the precise phonetic quality of these vowels. Andrea Calabrese has proposed that they were [ɑ ɑː ɛ ɛː i iː ɔ ɔː u uː] (On the Evolution of the Short High Vowels of Latin into Romance).
What is known is that at some point during Classical Latin or between Classical and Vulgar Latin, the corresponding long and short vowels also became distinguished in quality. (Calabrese mentions Allen and Sturtevant as linguists who reconstruct these quality distinctions back to the Classical Latin stage.) The non-low vowels (all but a aː) clearly show distinct qualities for short vs. long in some of the Romance languages descended from Vulgar Latin, which causes us to reconstruct something like [a aː ɛ eː ɪ iː ɔ oː ʊ uː]. I believe I've read some accounts that also reconstruct a difference in quality for short a and long a along the lines of [ɐ aː], but I don't know what evidence this is based on. Short unstressed i between a consonant and a vowel (which in Romance often developed to some kind of glide, or palatalized the preceding consonant and was lost entirely) may have had a slightly different quality more like [i] or [ij], at least for some speakers or some of the time.
Vulgar Latin is also believed to have had long [ɛː], but as the realization of ae rather than of ē.
Metrical Weight (which is not the same as real vowel quantity)
Note also that sometimes when dealing with poetry or old dictionaries, you might see macrons used (or misused) just to mark heavy syllables.
In Latin, a syllable is "heavy" if it has a long vowel, or ends in a consonant, or both. Heavy syllables are relevant to rules of word stress and poetic scansion.
Syllables that end in a consonant can have either long or short vowels; in either case they are heavy because they end with a consonant. There is a confusing old tradition of referrring to the vowels in such syllables as being "long by position", but they aren't necessarily actual long vowels.
In fact, the vowel in such syllables has a "hidden quantity," so be careful in situations like this and try to check several sources that distinguish between short and long in closed syllables to see if they agree on the length of the vowel. We cannot reconstruct vowel length here based on metrical evidence, but we sometimes can based on inscriptions that use the apex, vowel quality in descended Romance words, or descriptions of ancient grammarians.
It's usually fairly obvious if a syllable ends in a consonant in Latin, but there are a few tricky cases where a single letter may represent a double consonant (which is always divided between two syllables for metrical purposes). In particular, the consonants j and z are not written double, but generally represent double consonants in Latin, so a vowel preceding either of these will have hidden quantity (and might be written with a macron even if the vowel is short, to indicate that the syllable is heavy). I actually just found an apparent example of this in a recent question (When is an I not an I?): apparently the word most dictionaries write as māiŏr was, according to the linguist W. Sidney Allen, actually pronounced as /majjor/ with short "a," but a long /jj/.
There are also some cases where it seems word-final consonants in Latin were pronounced long, and you may see this written as a macron on the preceding vowel. According to The Latin Language: A Historical Outline of Its Sounds, Inflections, and Syntax, by Charles Edwin Bennett (1907), a long final consonant may have occurred in some words where original -s was assimilated to a preceding s, l, or r (as in far, farris, possibly pronounced /farr, farris/). Another word that is believed to have had a long final consonant is hoc (sometimes written hōc) which Bennett says was pronounced /hokk/ and not /hoːk/.
Automatic (but real) Quantity
Another related point of pronunciation: macrons are generally always used on vowels that occur in the combinations Vnf and Vns (where "V" stands for any vowel). Although this means there is no contrast here between short and long, it does appear that these vowels were phonetically long (The Latin Language: A Historical Outline of Its Sounds, Inflections, and Syntax, by Charles Edwin Bennett). In languages descended from Latin, the consonantal /n/ sound was actually regularly dropped from Vns clusters (example: Italian isola < Latin īnsula). However, when "ns" occurred due to a prefix ending in "n" coming before a stem starting with "s", analogical retention or restoration of /n/ in Romance languages is common. And since pretty much all instances of "nf" in Latin are due to prefixation, I don't actually know of any word in a Romance language that has denasalized a Latin "nf" cluster.
I don't remember if there is any consensus on if a nasal consonant was phonetically present in these sequences in Latin. In any case, it is believed that in classical times the preceding vowel in such words was pronounced with nasalization, so sequences like īnf would still have contrasted with sequences like īf in Classical Latin even if the consonant /n/ was already elided: it would be [ı̃ːf] vs. [iːf]. (If a nasal consonant was present, it was likely assimilated to the labiodental articulation of the following /f/, giving the pronunciation [ı̃ːɱf].)
Indirect evidence for other pronunciation features
As far as I know, a macron doesn't affect the pronunciation of any other sound directly. But knowing that a vowel is long may help you apply the regular Latin stress rule, whereby a word is stressed on the second-to-last syllable if it is heavy (contains a long vowel or diphthong or ends in a consonant) and on the third-to-last if the the second-to-last is light (contains a short vowel and doesn't end with a consonant). In addition, as jwodder pointed out in a comment, a macron on either vowel in a sequence like ae, oe, au, eu tells you that the two vowels are pronounced separately rather than as a diphthong.