With data grid views you can edit the values in cells directly using the control on the form, and it should automatically update the DB if it's data bound.
To edit programmatically, if you know the X and Y positions of what you're trying to retrieve/edit, you can use:
using System.Windows.Forms;
// Get the value
object obj = myDataGridView[X, Y].Value
// Set the value
myDataGridView[X, Y].Value = obj;
This will allow you to access the value directly.
However, you can't always explicitly state what you want to retrieve. If the user selects a row on the data grid view you can use:
// This retrieves the current row selected on the data grid view
DataGridViewRow row = myDataGridView.CurrentRow
// This gets the cell objects for the row
DataGridViewCellCollection cells = row.Cells;
// This gets the value stored for the column with header 'ColumnName' on the current row
object obj = cells["ColumnName"].Value;
// Use this to get the value in one line
object obj = myDataGridView.CurrentRow.Cells["ColumnName"].Value;
// Use this to set the value in one line
myDataGridView.CurrentRow.Cells["ColumnName"].Value = obj;