Cases where the number field case and the function field (with positive characteristic) are different In number theory there is often an analogue between statements which holds over a number field (that is, a finite field extension $K/\mathbb{Q}$) and function fields (that is, finite extensions of the form $K/\mathbb{F}_q(t)$ where $q = p^k$ for some prime $p$ and $k \geq 1$). One of the most famous examples of such an analogue is the Riemann hypothesis. Weil showed that the Riemann Hypothesis holds for the function field case. However, progress on the function field case has not shed much, if any, light on the corresponding case for number fields.
An example of where the analogy breaks down (conjecturally) is the Brauer-Manin obstruction. For hypersurfaces defined over $\mathbb{P}^n(K)$ for some number field $K$, it is expected that most hypersurfaces $X$ of degree $d \geq n+1$ will be of general type, and hence neither satisfy the Hasse principle nor have its failure to satisfy the Hasse principle accounted for by the Brauer-Manin obstruction. Harari and Voloch showed that for function fields of positive characteristic, this is not the case: indeed in this paper (http://www.ma.utexas.edu/users/voloch/Preprints/carpobs3.pdf) they showed that the Brauer-Manin obstruction is the only reason Hasse principle can fail in this case.
Another case where the analogy is not convincing is ranks of elliptic curves. It is known that elliptic curves over a function field of positive characteristic may have arbitrarily large rank. However, this question is not known even conjecturally in the number field case. Indeed it seems that many experts disagree on this question. At a recent summer school on counting arithmetic objects in Montreal, Bjorn Poonen gave a take on a heuristic suggesting that elliptic curves over number fields should have bounded rank. Andrew Granville, one of the organizers, agrees with this assertion. However, other experts present including Manjul Bhargava disagreed. 
My question is, what are some other situations where one expects genuinely different behavior between the function field setting and the number field setting?
 A: Several cases of the Bateman-Horn conjecture on prime values of polynomials are quite different. 
See the paper by Conrad, Conrad, and Gross in http://math.stanford.edu/~conrad/papers/genuszerofinal.pdf.  
A: Instead of the final results, let me focus on the underlying reasons why number fields and function fields are different.
A. Every function field has subfields of arbitrarily large index (e.g. by taking the field generated by a rational function of large degree). But each number field has a subfield of maximal (finite) index.
This actually explains the discrepancy in the bounded ranks heuristic. The heuristic, being probabilistic, is not expected to apply to a special family of curves that has unusually high rank for a good reason. For instance, if you take an extension of $\mathbb Q$ with Galois group $(\mathbb Z/2)^n$, by looking at root numbers you can see that the average rank of curves in the family is at least $2^{n-1}$. The constructions of curves of large rank over function fields all, I believe, involve a similar pullback - but the pullback is from a subfield of $\mathbb F_q(t)$ to $\mathbb F_q(t)$.
B. There exist isotrivial objects over function fields. These have properties that cannot occur over number fields, because the fact that each prime number is different places a lower bound on how similar  the reductions of a variety modulo different places can be.
For instance, there are no elliptic curves with good reduction at every place of $\mathbb Q$, and no non-isotrivial elliptic curves with good reduction at every place of $\mathbb F_q(t)$, but there are isotrivial examples.
C. Numerical statements tend to be much simpler over function fields.
Szpiro's conjecture over a function field has the form $\Delta= O(N^6)$, not $\Delta= O(N^{6+\epsilon})$ as is known to be best possible over number fields. (This was changed from the ABC conjecture to answer Vesselin Dimitrov's objection about the Vojta conjecture being a more natural statement than the ABC conjecture in the function field setting - I think Szpiro's conjecture is also a very natural statement). As Vesselin points out, this might also be related to B, and the fact that the moduli space of elliptic curves is isotrivial.
There exist constructions hitting simple numerical lower bounds, such as extensions of $\mathbb F_q(t)$ of degree $n$ and Galois group $S_n$ whose conductor exactly reaches the lower bound you get by looking at L functions, $q^{2(n-1)}$. One can get similar lower bounds by looking at L functions over number fields, but it is not at all obvious that there exist extensions that reach them.
D. The zeta function has infinitely many poles over function fields, but only one pole over a number field. This makes the ideal-counting and prime-counting functions both logarithmically periodic - i.e. all polynomials, and all prime polynomials, have norm $q^n$ for some $n$, not smoothly distributed like the sizes of numbers and prime numbers are.
One usually deals with this by considering polynomial of fixed degree, and viewing that as the function field analogue of a large interval, but sometimes it recurs in ways that might be surprising. For instance, the error term in the formula for the number of squarefree polynomials of degree $n$ is $2$-periodic in $n$. This sort of makes sense because squaring is $2$-periodic also.
E. The zeta function has finite complexity over function fields, but infinite complexity over number fields. The obvious aspect of this is that the zeros are periodic. Usually one accounts for this by, if considering a problem that involves many zeros, taking the large $g$ limit. However another facet is that each zero is an object with a simple description, being the log of an algebraic number.
This means that phenomena (like two zeros being equal, or a linear dependence among the zeros) that would be infinitely improbable over number fields, and thus we expect that they never happen, unless there is a good reason (like the same L function appearing twice in the product for a Dedekind zeta function, forcing some zeros to occur with multiplicity), are only finitely improbable and thus we expect them to happen occasionally. So the linear independence conjecture, for instance, is known to be false over some function fields, but is known to hold for randomly chosen function fields.
F. There is no Archimedean place and no $p$-adic Hodge theory over function fields. This causes a number of statements to be simpler - for instance, the analogues of the Fontaine-Mazur conjecture and Langlands conjectures are much simpler.
G. $p$-adic properties, like the Newton polygon of Frobenius, behave much better over function fields, because you don't have to keep changing $p$. For instance, a non-isotrivial elliptic curve over a function field has only finitely many supersingular primes.
H. Over function fields, the Mobius function $\mu(f + g^p)$ is proportional to a quadratic Dirichlet character in $g$ modulo the derivative of $f$. The set of such sums behaves like a short interval / arithmetic progression / Bohr set, in addition to being the set of values of a polynomial, but in none of these special sets is the Mobius function expected to behave like a Dirichlet character over the integers. This underlies the deviation in the Bateman-Horn conjecture mentioned in Lior Bary-Soroker's answer. It also was exploited in recent work of Mark Shusterman (EDIT: and myself).
I. Additive combinatorics seemingly behaves much differently over function fields. Work of Ellenberg and Gijswijt showed that the maximum size of a set of polynomials of degree $<d$ free of three-term arithmetic progressions has size at most $q^d / \left(q^d\right)^\epsilon$ for some $\epsilon>0$ depending on the characteristic. On the other hand, over the integers there are examples due to Behrend of subsets of $\{1,2,\dots,N\}$ free of three-term progressions of size at least $N/ e^ { O(\sqrt \log N)}$. Because $N$ is the analogue of $q^d$, the upper bound in the function field case is much smaller than the lower bound in the number field case, so whatever the true maximum size in each case, the two must be very different.
A: A Carmichael number is a composite integer $n > 1$ such that $a^{n-1} \equiv 1 \bmod n$ for all integers $a$ relatively prime to $n$. Carmichael numbers can be characterized by Korselt's criterion: a composite integer $n$ is Carmichael iff it is squarefree and for every prime $p$ dividing $n$ we have $(p-1) \mid (n-1)$. Likewise, define a Carmichael polynomial $f(x) \in \mathbf F_q[x]$ to be reducible such that $a^{{\rm N}(f)-1} \equiv 1 \bmod f$ for all $a$ in $\mathbf F_q[x]$ that are relatively prime to $f$, where ${\rm N}(f) = q^{\deg f}$. Korselt's criterion carries over to $\mathbf F_q[x]$: a reducible $f$ in $\mathbf F_q[x]$ is Carmichael if and only if it is squarefree and for every (monic) irreducible $\pi$ dividing $f$ we have $({\rm N}(\pi)-1)\mid ({\rm N}(f)-1)$. 
This is just reinforcing the analogy between $\mathbf Z$ and $\mathbf F_q[x]$, so what's the point?
A non-analogy is that a Carmichael number can't be a product of two primes, but a Carmichael polynomial can be a product of two irreducibles: the product of two different monic irreducibles of the same degree is a Carmichael polynomial. The reason the analogy is breaking down is that in $\mathbf Z$ two different positive integers don't have the same size, but different monic polynomials in $\mathbf F_q[x]$ can have the same degree. If you were to define Carmichael ideals in number rings, where beyond $\mathbf Z$ there are always different prime ideals of the same norm, a product of two different prime ideals of the same norm is a Carmichael ideal. Thus in a sense the analogy still works as long as you are in a number ring other than $\mathbf Z$, so again what's the point?
The reason I am posting this answer is because of a concrete consequence of Carmichael numbers never being a product of two primes (a fact that by itself looks like an accident) that is an algorithmic non-analogy between $\mathbf Z$ and $\mathbf F_q[x]$. In the Miller-Rabin primality test in $\mathbf Z$ the number of Miller-Rabin witnesses for the compositeness of an odd integer $n$ is always at least 75%, with this lower bound probably being asymptotically sharp (there is a sequence of odd composite $n$ whose proportion of Miller-Rabin witnesses tends to 75% from above if we believe that certain linear expressions can be prime infinitely often together). At one point in the proof of this 75% lower bound it's important to know that a product of two primes is never a Carmichael number. As I said above, the analogue of that fact in $\mathbf F_q[x]$ is false, infinitely often, and as a result in the Miller-Rabin irreducibility test in $\mathbf F_q[x]$ (for odd $q$) the sharpest asymptotic lower bound for the proportion of Miller-Rabin witnesses is less than 75%. This is due entirely to the Carmichael $f$ that are products of two different monic irreducibles of the same degree. For all the other reducible $f$ the proof in $\mathbf Z$ still works and the 75% lower bound goes through. But for a Carmichael polynomial that is a product of two irreducibles of the same degree, the proportion of Miller-Rabin witnesses to reducibility is at most 75% rather than at least 75%, and is in fact strictly less than 75% except a finite number of times. The proportion of Miller--Rabin witnesses for such a polynomial is still always greater than 50%, so it shouldn't take long to find a Miller-Rabin witness for any reducible polynomial, but the usual advantage of the Miller-Rabin test over the Solovay-Strassen test in $\mathbf Z$ based on the higher lower bound on the proportion of witnesses is weakened.
Here is a concrete example.  In ${\mathbf F}_7[x]$ let $f(x) = x(x-1)$. The number of Miller-Rabin witnesses is 30 and $30/(7^2-1) = 30/48 = 5/8 = .625 <  3/4$. 
For such Carmichael polynomials their proportion of Miller--Rabin witnesses tends to 1/2 or 2/3, rather than 3/4, as the degree of the polynomial tends to infinity. (To have a limit you need to restrict the degree of the irreducible factors in such polynomials to be either even or odd if $q \equiv 3 \bmod 4$.) The asymptotic lower bound on the proportion of witnesses for the Solovay-Strassen test in $\mathbf F_q[x]$ is 50%.
A: I answered this question once already, but another example where $\mathbf Z$ and $k[x]$ behave differently when $k$ is a finite field was brought to my attention recently by Jeff Lagarias and it deserves being mentioned here as a separate answer.
Theorem 1. The group ${\rm SL}_2(\mathbf Z)$ is finitely generated.
Theorem 2.  For each finite field $k$, the group ${\rm SL}_2(k[x])$ is not finitely generated.
Theorem 1 goes back to the 19th century, with ${\rm SL}_2(\mathbf Z)$ having  generators $S = (\begin{smallmatrix}-1&0\\ \, 0&1\end{smallmatrix})$ and $T = (\begin{smallmatrix}1&1\\0&1\end{smallmatrix})$. Theorem 2 is due to Nagao ("On GL(2,$K[X]$)," J. Inst. Polytech. Osaka City Univ.Ser. A10 (1959), 117-121).
The two theorems of course also hold using ${\rm GL}_2$ rather than ${\rm SL}_2$.
To appreciate the special nature of the $2 \times 2$ matrix setting, Nagao points out at the start of his paper that for $n \geq 3$ the groups ${\rm SL}_n(k[x])$ and ${\rm GL}_n(k[x])$ are finitely generated.
Since a finitely generated group has only finitely many subgroups of each index, ${\rm SL}_2(\mathbf Z)$ has countably many subgroups of finite index. In contrast to that, ${\rm SL}_2(k[x])$ for finite $k$ has uncountably many subgroups of finite index.
Generalizations of Theorem 2 are in A. W. Mason, "Serre's generalization of Nagao's theorem: an elementary approach," Trans. Amer. Math. Soc. 353 (2001), 749-767 and H. Behr, "Arithmetic groups over function fields. I. A complete characterization of finitely generated and finitely presented arithmetic subgroups of reductive algebraic groups," J. Reine Angew. Math. 495 (1998), 79-118.
