Once the end of a domino has been placed on the end of another domino, those ends are closed and no further dominoes can be attached to them.
There are never more than two ends open anywhere on the board. These are always the outside ends of the domino chain.
If you can't play onto either end of the board, you must pass your turn.
If you are placing a double tile, it is customary (but not necessary) to set the tile perpendicular to the tile you are playing onto. Regardless of orientation, only one side of the double tile (the side opposite the touching side) is considered free.
If you run out of space, it is acceptable to play a domino onto the appropriate side of the open tile so that the line of dominoes turns. This has no strategic value, and is only done to save space.