The difference between these two types of inflation is found in their causes. Both have the same effects (increasing price level), but they are caused by different things.
Demand-pull inflation is caused by excess demand. When the people as a whole get more money they are able to pay more for goods and services (unless more goods and services are produced). Economists talk about more money "chasing" the same amount of goods and services. This causes shortages and prices rise.
Cost-push inflation is caused by disruptions in supply. These disruptions cause increases in the price of production. That leads to inflation. For example, a rise in the price of oil causes practically all production to become more expensive.
There is no technical way to determine for sure which kind of inflation is going on. Analysts must simply look around to try to see if the money supply is increasing or if there are supply shocks. Then they have to make informed guesses about why the inflation is happening.
Inflation is the persistent rise in general price level. demand pull inflation is one where there is an increase in price level due to the increase in the aggregate demand.
On the other hand the cost push inflation is one where price level increases due to the increase in the price of inputs like increase in wages and raw materials. the increase in price of inputs decreases the short run aggregate supply which increases the price level.
thus if there is a shift in the supply curve backwards we say that inflation is cost push and when there is a rightward shift in the demand curve we say that its demand pull inflation.