Constraints and affordances are concepts applied in User Centred Design.
A constraint is a limitation imposed by a design.
An affordance is a possibility provided by a design.
Constraints and affordances may be deliberate or unintended.
The replica Roman helmet below is made of steel, which has the affordance of enabling modification via numerous metalworking methods.
The hard hat below is made of plastic, and has the deliberate constraint of being difficult to modify, because amateur modifications could dangerously compromise the strength of the hat and the protection that it offers to the wearer.
One common form of constraint is a blocking function, where the design deliberately stops the user from doing something, either partially or completely. This is usually done as a security or safety function.
Users of a product often find affordances which allow them to use the product in unintended and sometimes dangerous ways. Techniques such as projective approaches and indirect observation can be invaluable for identifying such situations before they become problematic.