Why is a Topological Field Theory equivalent to a Frobenius algebra? How can a physicist understand a 2-dimensional topological field theory as a Frobenius algebra? Are there some explicit examples in order to understand this relation?
The definition (e.g. on Wikipedia) of the Frobenius algebra is quite clear, it is a finite dimensional associative algebra equipped with a special non-degenerate bilinear form. If this algebra is represented by $n\times n$ matrices then the bilinear form is the trace.
Now, I fail to see how this is a TFT. 
In specific two very famous topological field theories in 2-dimensions (that physicists work with a lot) are the topological A-model and the topological B-model (a la Witten). These models are related via mirror symmetry. How are they defined as a Frobenius algebra and what are their differences as a Frobenius algebra? And natural question to ask is wether mirror symmetry in the TFT side relates somehow the two Frobenius algebras on the algebra side.
So I would like to understand intuitively why a Frobenius algebra and a TFT are the same thing and the detail I ask in specific about the A-model and the B-model which are of my main interest.
 A: Summary: the equivalence relies on the mathematical formalism of TQFTs, and sends a 2d TQFT $Z$ to the state space $Z(S^1)$, which is naturally a Frobenius algebra.

One potential point of confusion is that people think of TQFTs in different ways. They were originally defined as QFTs that only depend on topological information, so the emphasis was on the action functional.
Mathematicians formalized this with a different-looking definition called a functorial TQFT, first written down by Atiyah (1988). The paper has some motivation for why this is a good definition. Dan Freed's notes, starting at lecture 14, are a good source, though they're light on examples.
To a mathematician, an $n$-dimensional (oriented) TQFT $Z$ is the following data:


*

*for every closed oriented $(n-1)$-manifold $N$, a state space $Z(N)$, which is a complex vector space. (As a consequence of the other axioms, it's finite-dimensional.)

*for every diffeomorphism class of oriented bordisms of $(n-1)$-manifolds $X:N_1\to N_2$, a linear map $Z(X): Z(N_1)\to Z(N_2)$,


such that


*

*gluing of bordisms induces compositions of their linear maps, and

*$Z(N_1\amalg N_2) = Z(N_1)\otimes Z(N_2)$. (In particular, $Z(\varnothing) = \mathbb C$.)


If $M$ is a closed $n$-manifold, it's in particular a bordism from the empty set to itself, so defines a linear map $Z(\varnothing)\to Z(\varnothing)$, which is multiplication by some complex number. That number is the partition function of $M$.
From this perspective, the equivalence between 2-dimensional TQFTs and Frobenius algebras comes from the structure of 1- and 2-dimensional manifolds. Suppose $Z$ is a 2-dimensional TQFT.


*

*Every closed oriented 1-manifold $N$ is a finite disjoint union of circles, so $Z(N)$ is determined by $Z(S^1)$.

*Every oriented bordism between closed $1$-manifolds can be decomposed, as disjoint unions and by cutting into a sequence of bordisms, into incoming and outgoing pairs of pants (bordisms between $S^1$ and $S^1\amalg S^1$) and incoming and outgoing discs (bordisms between $S^1$ and $\varnothing$).


This is where the Frobenius algebra structure comes from.


*

*The outgoing pair of pants is a bordism $S^1\amalg S^1\to S^1$, hence defines a map $Z(S^1)\otimes Z(S^1)\to Z(S^1)$, which will be the algebra multiplication.

*The cylinder, considered as a bordism $S^1\amalg S^1\to\varnothing$, defines the inner product map $Z(S^1)\otimes Z(S^1)\to\mathbb C$.


Diffeomorphism relations between various bordisms show that these maps define a Frobenius algebra structure on $Z(S^1)$. It's also possible to go the other way, which provides the desired equivalence.
A: As the general relation between 2d TQFT and Frobenius algebras has already been given in another answer, let me describe the Frobenius algebras occurring in the A and B-models.
1) The A-model is defined for a compact symplectic manifold $(X,\omega)$. The vector space underlying the Frobenius algebra is the cohomology $H^{*}(X,\mathbb{C})$. The products of the Frobenius algebra is the quantum product, a deformation of the usual cup-product by counts of pseudo-holomorphic spheres (strictly speaking, the usual definition of the quantum product involves formal power series. These power series are expected to converge for $\omega$ big enough and the case of general $\omega$ should be defined by analytic continuation).The bilinear form is the usual intersection pairing on cohomology, which is non-degenerate by Poincaré duality. Remark that if $X$ is Kähler then we have a Hodge decomposition $H^i(X,\mathbb{C})=\bigoplus_{p,q, p+q=i} H^p(X,\Omega_X^q)$.
(EDIT: here is an explicit description of the quantum product. Let $a$, $b \in H^\bullet(X,\mathbb{C})$. We want to define their product $a * b$. Because the intersection pairing (,) is non-degenerate, it is enough to know the number $(a*b,c)$ for every $c$. The formula is 
$(a*b,c)=\sum_{\beta \in H_2(X,\mathbb{Z})} N_{abc,\beta} e^{-\int_\beta \omega}$
where $N_{abc,\beta}$ is intuitively the number of holomorphic spheres in $X$ of class $\beta$ intersecting given submanifolds Poincaré duals to $a$,$b$,$c$. The precise definition of this number (rational in general) is the subject of Gromov-Witten theory)).
2) The B-model is defined for a compact complex manifold $Y$, of complex dimension $n$. The vector space underlying the Frobenius algebra is the space $HH^\bullet(Y)$ defined by $HH^i(Y)= \bigoplus_{p+q=i} H^p(Y,\wedge^q T_Y)$ where $T_Y$ is the holomorphic tangent space to $Y$.The product comes from the natural product of bivector fields. The bilinear form pairs non-trivially $H^p(Y, \wedge^q T_Y)$ and $H^{n-p}(Y, \wedge^{n-q} T_Y)$ and is defined using the Calabi-Yau condition: we have $H^p(Y, \wedge^q T_Y)=H^p(Y,\Omega_Y^{n-q})$
and $H^{n-p}(Y, \wedge^{n-q} T_Y)=H^{n-p}(Y, \Omega_Y^q)$ and then we use the standard integration pairing (or Serre duality depending on the language you prefer). 
If $(X,\omega)$ and $Y$ are mirror, the corresponding Frobenius algebras structures are isomorphic. For example, we have $H^p(X,\Omega_X^{n-q})=H^p(Y,\Omega_Y^q)$, which at the level of dimensions is the usual mirror symmetry relation for Hodge numbers. But the identification of Frobenius algebras on both sides contains much more information and is crucial in the concrete application of mirror symmetry. For example, saying that the product on the two sides are the same will relate the quantum product of X, defined in terms of counts of holomorphic curves, to the some product defined uniquely in terms of the complex structure of Y. 
As mentionned in the comments to the question, it is often useful to think in terms of extended TQFT, which in physical terms means to take into account topological boundary conditions/branes. These topological boundary conditions naturally form a Calabi-Yau (dg/$A_\infty$) category and one recovers the Frobenius algebra from the Hochschild cohomology/homology of this category. For the A-model, the category is the Fukaya category and for the B-model, the category is the derived category of coherent sheaves. Mirror symmetry makes sense at this extended level (it is the "homological version" of mirror symmetry proposed by Kontsevich). 
A: Arun Debray's answer is good, with one addendum: 2d TQFT is the same thing as a commutative Frobenius algebra.  But to truly understand what's going on, one also needs some pictures.  A commutative Frobenius algebra can be defined using pictures that just happen to look exactly like the relations holding between 2-dimensional cobordisms.  The best place to learn about this is here:


*

*Joachim Kock, Frobenius Algebras and 2d Topological Quantum Field Theories, Cambridge U. Press, Cambridge, 2004.


But briefly, a Frobenius algebra has a multiplication and unit obeying associativity and the left and right unit laws:

and also a comultiplication and counit obeying coassociativity and the left and right counit laws:

where the multiplication and comultiplication obey the Frobenius laws:

A Frobenius algebra is commutative if switching two things and then multiplying them is the same as multiplying them:

Furthermore, a Frobenius algebra is commutative iff it is cocommutative, meaning this:

The ultimate statement of this fact is that $2\mathrm{Cob}$, the category with compact oriented 2-dimensional cobordisms as morphisms, is the free symmetric monoidal category on a commutative Frobenius monoid object.  The story gets much more interesting in 3 dimensions, and for that I recommend this paper:


*

*Bruce Bartlett, Christopher L. Douglas, Christopher J. Schommer-Pries and Jamie Vicary, Extended 3-dimensional bordism as the theory of modular objects.

