A macro can be triggered either by a button or by some other events such as change in worksheet cells or opening a workbook or closing a workbook, etc. If you want to trigger a macro when a user makes a change in some cells of a worksheet, here's what you do:

In VB Editor, open the Worksheet module (of the sheet in question). Copy paste below code:

Private Sub Worksheet_Change(ByVal Target As Range)

'Define a range
Dim myRange As Range
Set myRange = Range("A1:B10000")

If Intersect(Target, myRange) Is Nothing Then
    Exit Sub
    'Your code comes here
End If

End Sub