Scalping, when used in reference to trading in securities, commodities and foreign exchange, may refer to either
  a legitimate method of arbitrage of small price gaps created by the bid–ask spread, or
  a fraudulent form of market manipulation.

Arbitrage
Scalping, in the arbitrage sense, is a type of trading in which traders try to open and close positions in very short periods of time in markets such as foreign exchange and securities with the aim of making a small profit from the trades.

How scalping works

Scalping is the shortest time frame in trading and it exploits small changes in currency prices. Scalpers attempt to act like traditional market makers or specialists. To make the spread means to buy at the Bid price and sell at the Ask price, in order to gain the bid/ask difference. This procedure allows for profit even when the bid and ask don't move at all, as long as there are traders who are willing to take market prices.  It normally involves establishing and liquidating a position quickly, usually within minutes or even seconds.

The role of a scalper is actually the role of market makers or specialists who are to maintain the liquidity and order flow of a product of a market.

The profit for each transaction is based only on a few bips (basis points), so scalping is typically conducted when there are large amounts of capital and high leverage or there are currency pairs where the bid–offer spread is narrow.

Principles
 Spreads are bonuses as well as costs Stock Markets operate on a bid and ask based system. The numerical difference between the bid and ask prices is referred to as the spread between them. The ask prices are immediate execution (market) prices for quick buyers (ask takers); bid prices for quick sellers (bid takers). If a trade is executed at market prices, closing that trade immediately without queuing would not get the seller back the amount paid because of the bid/ask difference. The spread can be viewed as trading bonuses or costs according to different parties and different strategies. On one hand, traders who do not wish to queue their order, instead paying the market price, pay the spreads (costs). On the other hand, traders who wish to queue and wait for execution receive the spreads (bonuses). Some day trading strategies attempt to capture the spread as additional, or even the only, profits for successful trades.
 Lower exposure, lower risks Scalpers are only exposed in a relatively short period, as they do not hold positions overnight. As the period one holds decreases, the chances of running into extreme adverse movements, causing huge losses, decreases.
 Smaller moves, easier to obtain A change in price results from imbalance of buying and selling powers. Most of the time within a day, prices stay stable, moving within a small range. This means neither buying nor selling power control the situation. There are only a few times which price moves towards one direction, i.e. either buying or selling power controls the situation. It requires bigger imbalances for bigger price changes. It is what scalpers look for capturing smaller moves which happen most of the time, as opposed to larger ones.
 Large volume, adding profits up Since the profit obtained per share or contract is very small due to its target of spread, they need to trade large in order to add up the profits. Scalping is not suitable for large-capital traders seeking to move large volumes at once, but for small-capital traders seeking to move smaller volumes more often.

Different parties and spreads
Whenever the spread is made one (or more) party must pay it (paying the cost to receive some value on completing the transaction quickly) and some party (or parties) will receive that money as profit.

Who pays the spreads (costs)
The following traders pay the spreads: 
 Momentum traders on technicals These traders look for fast movements hinted from quotes, prices and volumes, charts. When a real breakout occurs, price becomes volatile. A sudden rise or fall may occur within any second. They need to get in quick before the price moves out of the base.
 Momentum traders on news When news breaks out, the price becomes very volatile as many people watching the news will react at more or less the same time. A trader needs to take the market prices immediately as the opportunity may vanish after a second or so.
 Cut losses on market prices The spread becomes a cost if the price moves against the expected direction and the trader wishes to cut losses immediately on market price.

Who receives the spreads (bonuses)
The following traders receive the spreads: 
 Individual scalpers They trade for spreads and can benefit from larger spreads.
 Market makers and specialists People who provide liquidity place their orders on their market books. Over the course of a single day, a market maker may fill orders for hundreds of thousands or millions of shares. 
 Spot foreign exchange (exchanges of foreign currencies) brokers They do not charge any commissions because they make profits from the bid/ask spread quotes. On July 10, 2006, the exchange rate between Euro and United States dollar is 1.2733 at 15:45. The internal (inter-bank dealers) bid/ask price is 1.2732-5/1.2733-5. However the foreign exchange brokers or middlemen will not offer the same competitive prices to their clients. Instead they provide their own version of bid and ask quotes, say 1.2731/1.2734, of which their commissions are already "hidden" in it. More competitive brokers do not charge more than 2 pips spread on a currency where the interbank market has a 1 pip spread, and some offer better than this by quoting prices in fractional pips.

Factors affecting scalping
 Liquidity The liquidity of a market affects the performance of scalping. Each product within the market receives different spread, due to popularity differentials. The more liquid the markets and the products are, the tighter the spreads are. Some scalpers like to trade in a more liquid market since they can move in and out of large positions easily without adverse market impact.  Other scalpers like to trade in less liquid markets, which typically have significantly larger bid–ask spread.  Whereas a scalper in a highly liquid market (for example, a market maintaining a one-penny spread) may take 10,000 shares to make a 3 cent gain ($300), a scalper in an illiquid market (for example, a market with a 25 cent spread) may take 500 shares for a 60 cent gain ($300).  While there is theoretically more profit potential in a liquid market, it is also a "poker game" with many more professional players which can make it more difficult to anticipate future price action.
 Volatility Unlike momentum traders, scalpers like stable or silent products. Imagine if its price does not move all day, scalpers can profit all day simply by placing their orders on the same bid and ask, making hundreds or thousands of trades. They do not need to worry about sudden price changes.
 Time frame Scalpers operate on a very short time frame, looking to profit from market waves that are sometimes too small to be seen even on the one-minute chart. This maximizes the number of moves during the day that the scalper can use to make a profit. 
 Risk management Rather than looking for one big trade, the way a trend trader might, the scalper looks for hundreds of small profits throughout the day. In this process the scalper might also take hundreds of small losses during the same time period. For this reason a scalper must have very strict risk management that never allows losses to accumulate too much.

Fraudulent use by adviser and social media stock promotion

Scalping in this sense is the practice of purchasing a security for one's own account shortly before recommending that security for investment and then shortly thereafter selling the security at a profit upon the rise in the market price following the recommendation.  The Supreme Court of the United States has ruled that scalping by an investment adviser operates as a fraud or deceit upon any client or prospective client and is a violation of the Investment Advisers Act of 1940.  The prohibition on scalping has been applied against persons who are not registered investment advisers, and it has been ruled that scalping is also a violation of Rule 10b-5 under the Securities Exchange Act of 1934 if the scalper has a relationship of trust and confidence with the persons to whom the recommendation is made.  The Securities and Exchange Commission has stated that it is committed to stamping out scalping schemes.  

Scalping is analogous to front running, a similar improper practice by broker-dealers.  It is also similar to but differs from conventional pumping and dumping, which usually does not involve a relationship of trust and confidence between the fraudster and their victims.  Scalping schemes involving social media stock promoters have become a significant focus of both civil and criminal enforcement in the United States in recent years as the use of Twitter and other social media networks has allowed online stock promoters to tout stocks and then sell them on their followers after their stock promotion campaigns cause a spike in the share price.

References

External links
 Introduction To Types Of Trading: Scalpers at Investopedia

Arbitrage
Share trading