Luckily for us, a really smart guy named Josiah Willard Gibbs figured out how these two tendencies work together back in the late 1800's. As a result, in chemical thermodynamics we now have a state function called the Gibbs Free Energy that describes what is called the thermodynamic potential of a system at constant pressure, temperature, and number of molecules.
Since most of the systems we work with under lab conditions are at constant pressure and temperature and are typically closed to mass transfer (abbreviated as NPT), Gibbs free energy is a very convenient way of determining what will happen to a given chemical system under normal lab conditions.
The reason it works is that it is a potential energy function - it describes how a system's potential energy will change as different state variables change, and therefore lets us predict where the system will "try" to go. An analogy that works pretty well is to imagine it like the surface of a planet, where gravity is the potential energy. If the derivative or slope is negative in a given direction, then things will tend to "roll downhill" at that point. On the other hand, to make things go uphill, you need to add energy.
The other thing we can get from this analogy is that given the opportunity, things will eventually move from a state of higher potential energy to a state of lower potential energy. So we can compare the energy at two different states (the reactants and products, for example), and decide based on the difference in potential energy whether the reaction would be spontaneous under those conditions.
The equation for Gibbs free energy is:
$G = H - TS$
Where $H$ is enthalpy (a.k.a heat of reaction), $T$ is absolute temperature (usually measured in Kelvin) and $S$ is entropy.
If you take the derivative at constant temperature and pressure, you get:
$\Delta G = \Delta H - T\Delta S$
(This is for large changes. for small changes replace $\Delta$ with $\delta$). What this tells us is that change in Gibbs Free Energy is a function of change in enthalpy, change in entropy, and the absolute temperature.
To illustrate how this works, take a look at the following diagram.
Here the line represents the Gibbs Free energy "surface" - the thermodynamic potential as a function of some variable (a reaction coordinate, for example). The ball represents the system at some point along that coordinate axis. If this were regular potential energy, it would be easy to see what happens - the ball will roll downhill if it gets the chance, and it will stop at the lower energy state. To get back up the hill, someone would have to put in that amount of energy. For thermodynamic potentials, it works the same way - the system will move along the coordinate axis in the direction of decreasing thermodynamic potential energy ($G$ in this case).
This means that under constant NPT conditions, any process that involves an overall decrease in Gibbs Free energy will be spontaneous. It will also tend to move in the "direction" that has the most negative slope in G at any given time. In mathematical terms,
$\Delta G < 0$ - overall process is spontaneous
$dG < 0$ - process will be moving in that direction
$dG = 0$ - process is at equilibrium
So how does this all fit in with what you described about systems trying to reach minimum energy, and maximum entropy? The answer is: those are both thermodynamic potentials for different types of systems. For a system with constant entropy, volume, and number of particles, (NSV) the internal energy (or total energy) is the thermodynamic potential. For a system at constant entropy and pressure (NSP), enthalpy is the thermodynamic potential. And for a system at constant volume and internal energy (NVE), the negative of entropy is the thermodynamic potential.
In other words, all of these thermodynamic variables are interconnected, and a change in one affects all of the others. You can hold three constant at any given time and still allow the system to "move" through phase-space. Which thermodynamic potential you need to describe how the system will move depends on which variables you choose.
Let's look at the equation for $\Delta G$ and see how changes in enthalpy and entropy affect it.
$\downarrow \Delta G = \space \downarrow \Delta H - T \Delta S$
If $\Delta H$ decreases, it will make $\Delta G$ decrease as well. This makes sense, since we know that exothermic processes tend to be spontaneous, because they are releasing energy and therefore the final system energy is lower than the initial.
$\downarrow \Delta G = \Delta H - T \space \uparrow \Delta S$
On the other hand, $\Delta G$ tends to decrease as $\Delta S$ increases - this is because the change in entropy is subtracted in the equation. This also matches up with what you know - an increase in entropy indicates a spontaneous process.
For your last question:
I am really having a hard time in figuring out a reaction where energy decreases and entropy increases. Can this happen?
Yes, it can! In fact, under these conditions, the process is guaranteed to be spontaneous - if $\Delta H$ is negative, and $\Delta S$ is positive, then $\Delta G$ has to be negative - the reaction would be spontaneous at any temperature under these conditions.
Let's look at the other possibilities:
$\Delta H > 0; \Delta S < 0$
In this case, since $\Delta H$ is always positive, and we are subtracting a negative $\Delta S$, the reaction can never be spontaneous.
$\Delta H > 0; \Delta S > 0$
$\Delta H < 0; \Delta S < 0$
In these two cases, the reaction could be spontaneous or it could be non-spontaneous - it depends on the relative magnitudes of the enthalpy and energy terms as well as the temperature at which it occurs.
To summarize - all thermodynamic variables are related to each other in fairly complicated ways. When you hold three of them constant (two if you don't count number of molecules), you can derive thermodynamic potential energy functions that describe the behavior of the system in terms of a single quantity. For most cases in chemistry, Gibbs Free Energy is the thermodynamic potential that we use. It gives us the relationship between enthalpy, entropy and temperature under constant pressure conditions. Since it's the thermodynamic potential, it also lets us predict how the system will behave - how it will move through phase space.