Intuition behind the formula for macroscopic entropy Wikipedia says that the 'macroscopic' definition of entropy is:
$$ \Delta S = \displaystyle \int \dfrac{dQ_{\rm rev}}{T}$$
Where $T$ is the uniform absolute temperature of a closed system and $dQ_{\rm rev}$ is an incremental reversible transfer of heat into that system. 
I've always had trouble with derivatives and integrals in physical equations, and this is no exception. 
Why does the integral appear in this formula? I know that entropy has just been defined that way, but why? What is the logic behind dividing $dQ_{\rm rev}$ by $T$ and taking the integral of that?
 A: Thermodynamics is full of what is called differentials.
When you want to find the slope of a secant of a curve between points $(x_1,y_1)$ and $(x_2,y_2)$, you calculate
$\frac{y_2-y_1}{x_2-x_1}=\frac{\Delta y}{\Delta x}$
where the latter is just shorthand notation. Now, the idea behind derivatives is that you get the slope of the tangent if you let $\Delta x$ and $\Delta y$ tend to really, really small size and it is then when you call them $dx$ and $dy$. $dx$ is historically called the differential of $x$ and the slope of the tangent is then the differential quotient, or $\frac{dy}{dx}$. This explains the strange notation for derivates. It is also quite intuitive, e.g. the chain rule becomes $\frac{dz}{dx}=\frac{dz}{dy}\frac{dy}{dx}$, i.e. the quotient is "expanded" with the differential $dy$.
As intuitive this notation may be -- it's often also quite misleading. Any mathematicians reading this will squirm with pain by now. This notion of infinitesimal differentials is historical, it's how Newton and/or Leibniz invented calculus, but it lacks the rigor of modern mathematics. There is a rigorous definition of differentials, though, but it's more involved and not intuitively conceivable. Thus, thermodynamics is mathematically sound but physicist usually don't know the mathematics which is why it's everybody's favorite subject.
Ok, back to your initial question. You need to know $Q_{rev}$ as a function of the thermodynamic state variables it depends on. If those are temperature $T$, pressure $P$ and particle number $N$, one can use the chain rule for differentials to get
$\delta Q=\frac{\delta Q}{dT}dT+\frac{\delta Q}{dP}dP+\frac{\delta Q}{dN}dN$.
The reason why I wrote $\delta Q$ rather than $dQ$ is that heat is what is referred to as an inexact differential which simply means that heat is not a function of the thermodynamic state, but depends on the process. You cannot ask "How much heat is in it". Heat and work (work is also an inexact differential, $\delta W$) are ways to exchange internal energy. Internal energy is an exact differential, expressed by the first law: $dE=\delta Q+\delta W$. Entropy, $dS=\frac{\delta Q}{T}$ is, perhaps surprisingly, also an exact differential, a state quantity. Sadly, some physics books and teacher are sloppy at best on this crucial point. More sadly, everyday language is worse. We talk about "the amount of heat" all the time.
Ok, so the way to evaluate the integral $\Delta S=\int\frac{\delta Q}{T}$ is to consider the thermodynamical process. Luckily, you will almost certainly be asked to consider some simple process where only one variable varies. For example, in an isobaric process, the pressure is fixed and if the container is sealed, the particle number is fixed as well, thus we have
$(\delta Q)_{P,N}=\left(\frac{\delta Q}{dT}\right)_{P,N}dT$.
The subscript is a useful notation to remind ourselves which quantities are fixed. $\left(\frac{\delta Q}{dT}\right)_{P,N}$ is the isobaric heat capacity $C_P$. Thus, for an isobaric process where you go from temperature $T_{init}$ to $T_{final}$, we would get
$\Delta S = \int_{T_{init}}^{T_{final}}\frac{C_P(T)}{T}dT$.
A: OP is asking several questions simultaneously, and we will here only focus on just understanding the meaning of the integral (1) rather than trying to motivate it. 
I) We believe that OP is already aware that an integral 
$$\tag{1} \int \frac{dQ}{T} $$ 
can (for all physically relevant purposes) be thought of as a sum over sufficiently many terms
$$\tag{2} \sum \frac{\Delta Q}{T} $$ 
where each term itself is sufficiently small. Here $\Delta Q$ is the heat transfer.
II) Instead we believe that the heart of OP's question is the following. 

We write heat transfer as $\Delta Q$. Does it mean that 
  $$\tag{3}\Delta Q=Q_f-Q_i  \qquad\qquad\qquad\qquad \text{($\leftarrow$Wrong!)}$$ 
  can be thought of as difference between an initial and a final heat, $Q_i$ and $Q_f$, respectively?

Answer: No, $\Delta Q$ is unfortunately a misleading notation in this respect. There is no underlying state function $Q$! Whenever people talk about heat, they really mean heat transfer. 
Or going back to the integral (1): The infinitesimal heat transfer $dQ$ makes sense (as an inexact differential, typically denoted with a bar through the $d$, or alternatively as $\delta Q$), but there is no such thing as a $Q$ function. See also e.g. this Phys.SE question. 
A: Note that the infinitesimal definition of the thermodynamic entropy $dS = \frac{d Q_{rev}}{T}$ is only true for reversible process, the general formula for the thermodynamic entropy is $dS = \frac{\delta Q}{T}. $ 
Now, for a reversible process, you have $\Delta S = S_2-S_1 = \int_{S_1}^{S_2} dS = \int \frac{d Q_{rev}}{T}$
First, you have to check if the dimensionality of the quantities are correct, you have  $\frac{dS}{k} = \frac{dQ_{rev}}{kT} $, where $k$ is the Boltzmann constant. In this equation, the left and right hand side are dimensionless. $Q_{rev}$ and $kT$ have the dimension of an energy, so all is OK. 
So, for instance,if you don't want to put the temperature $T$ in the denominator, but put it in the numerator, you will have to find some  constant with an energy dimension, to be added in the formula. But  which one ? You see the problem.
Secondly, there is an other definition of the entropy, the statistical entropy, and the 2 definitions are coherent.
