Although in the past it was normal to scramble puzzles by doing a bunch of random turns by hand, nowadays most solves are done with cubes that have been scrambled by computers. For all common puzzles, there exist computer programs that will generate a randomized sequence of moves which can be applied to a cube to scramble it. The WCA regulations have a list of the official programs that are used to generate scrambles. Different puzzles have different notations; if you are unfamiliar with the basic cube notation, visit the notation page. Execute scrambles normally, as you would an algorithm.
The WCA specifies that all cubical puzzles should be held so that the U face is white and the F face is green. If white is not available U should be the lightest color on the cube, and if green is not available F should be the darkest color adjacent to the U color. Note that for white V-cubes scrambling is often done with black U and green F even though this goes against the WCA regulations, because black replaces white on those cubes.
Scrambling Specific Puzzles
Scrambles of the 2x2x2 are now optimal solutions for a randomly generated position, written with only R, U, and F turns. This is because of the increased efficiency of scrambling as well as the assurance of true randomness, as the position itself is random.
Official scrambles for 3x3x3 are generated not by random moves but by Cube Explorer. A random position is selected, and then a short solution (typically 20 moves or so) is found for this position. This is called a random-state scramble. For unofficial use, this method is fairly computationally expensive, so it is more common to just generate random 25-move scrambles. These are still very random, but the distribution of certain aspects of the cube is slightly less random than it should be. With timing applications like CCT and cTimer now providing random-state scrambles on-the-fly, their use in unofficial solving is becoming more common.
For convenience, big cube scrambles use a special format called multislice, where the scrambler should always execute a block turn instead of a slice turn. For example, on a 4x4 scramble, an r turn should be executed as a double-layer turn (that is, Rw).
The current Pyraminx scrambler uses a total of 25 moves: first it randomly orients the tips (note that each tip has a 1/3 chance of not being affected), and then it adds regular moves until there are a total of 25 moves. The notation differs significantly from cube notation, so if you are confused you should check out Pyraminx Notation for more details.
There are two scramble schemes for the Megaminx. The old scheme scrambles similar to cubes: each face is given a letter, and then 60 random face turns are generated. The newer (and official) scheme, developed by Stefan Pochmann, involves holding the puzzle by a 1x3 column of pieces, and uses just three types of turns: R is a turn of the entire right part of the puzzle (all minus the left layer), D is a turn of the entire bottom part of the puzzle (all minus the top layer), and U is a turn of the top face only. This scrambler uses 70 turns. Sometimes you will see Y (a cube rotation around the top face) used instead of U for these types of scrambles.
It is interesting to note that, even though the new scrambler produces cubes which appear scrambled and are difficult to solve, it can only generate a very small fraction of the possible positions of the puzzle. However, to generate every possible position would require over 200 moves of this format, so this concern is unlikely to affect WCA policy regarding Megaminx scrambles.
Scrambles for Clock are complicated, and the notation has nothing to do with normal notation. For each turn, first a pin position is given (U is a pin pointed towards the scrambler, d is a pin pointed away) and then a u number and a d number are given. Any one of the corner clocks next to a U pin should be rotated clockwise by the u number of hours, and any of the corner clocks next to a d pin should be rotated clockwise by the d number of hours. At the end, there is one final pin position, which is the position the pin should be placed in.
Square-1 scrambles are also completely different from the scrambles for cubical puzzles. First, hold the puzzle so that the mixable faces are on U and D, and so that the middle layer on the front has two stickers, of which the small one is on the left. There are approximately 16 moves, each of which is written in the form (x,y). This means that the top face should be rotated by x times 30 degrees clockwise (an edge is 30 degrees and a corner is 60), and the bottom face should be rotated by y times 30 degrees clockwise, and finally the right half of the puzzle should be turned by 180 degrees.
As a warning, you should note that these scrambles are notoriously difficult to get correct. A wrong turn almost always leads to a position where the given turn is physically impossible to make. If this happens in a competition, it is best to solve the puzzle and just start again.