To rebuild all indexes on a table:
ALTER INDEX ALL ON YourTableName REBUILD;
To reorganize all indexes on a table:
ALTER INDEX ALL ON YourTableName REORGANIZE;
Rebuilding indexes reorganizes the entire index tree, while reorganizing is a lighter operation that defragments the leaf level of the index.